LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] driver/e1000e: Fix default interrupt mode select
From: Kumar Gala @ 2011-04-11 13:11 UTC (permalink / raw)
  To: Prabhakar Kushwaha; +Cc: meet2prabhu, linuxppc-dev, Jin Qing
In-Reply-To: <1302503898-22023-1-git-send-email-prabhakar@freescale.com>


On Apr 11, 2011, at 1:38 AM, Prabhakar Kushwaha wrote:

> From: Prabhakar <prabhakar@freescale.com>
>=20
> e1000 default interrupt mode is MSI. No matter user select MSI or
> disable MSI in kernel config.
>=20
> Signed-off-by: Jin Qing <b24347@freescale.com>
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> ---
> Based upon =
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git(branc=
h master)
>=20
> drivers/net/e1000e/param.c |    4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)

You should send this to netdev and CC the e1000e Maintainer.

- k=

^ permalink raw reply

* RE: Problem with mini-PCI-E slot on P2020RDB
From: Kushwaha Prabhakar-B32579 @ 2011-04-11 11:09 UTC (permalink / raw)
  To: Felix Radensky
  Cc: Mahajan Vivek-B08308, Aggrwal Poonam-B10812, Leon Woestenberg,
	linuxppc-dev@ozlabs.org, Gupta Maneesh-B18878, Fabian Bertholm
In-Reply-To: <4DA2BE49.9000003@embedded-sol.com>

Hi,

Yes. It wil be applicable for all revisions.=20

Regards,
Prabhakar

> -----Original Message-----
> From: Felix Radensky [mailto:felix@embedded-sol.com]
> Sent: Monday, April 11, 2011 2:10 PM
> To: Kushwaha Prabhakar-B32579
> Cc: Fabian Bertholm; Leon Woestenberg; linuxppc-dev@ozlabs.org; Mahajan
> Vivek-B08308; Aggrwal Poonam-B10812; Gupta Maneesh-B18878
> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>=20
> Hi,
>=20
> Assuming I have all patches in place, will this problem be resolved on
> earlier board revisions (before rev D) ?
>=20
> Felix.
>=20
> On 04/11/2011 12:06 PM, Kushwaha Prabhakar-B32579 wrote:
> > Hi Fabe,
> >
> > Yes .. P1020/P1011 RDB has same issue as of P2020RDB.
> >
> > It was because of some missing patches at u-boot and Linux.
> >
> > U-boot patch : It is already present in open source. Please use latest
> > code base Linux patch : I am in process of posting in open source.
> Please make mentioned changes of IDSEL.
> >
> > --Prabhakar
> >
> >> -----Original Message-----
> >> From: Fabian Bertholm [mailto:fabeisageek@googlemail.com]
> >> Sent: Monday, April 11, 2011 1:53 PM
> >> To: Kushwaha Prabhakar-B32579
> >> Cc: Leon Woestenberg; linuxppc-dev@ozlabs.org; Mahajan Vivek-B08308;
> >> Felix Radensky; Aggrwal Poonam-B10812; Gupta Maneesh-B18878
> >> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
> >>
> >> Hello Kushwaha Prabhakar,
> >>
> >> Our impression is that there is the same issue on the P1020/P1011 RDB.
> >> Can you confirm this?
> >>
> >> Best Regards,
> >> Fabe
> >>
> >>
> >> 2011/4/8 Kushwaha Prabhakar-B32579<B32579@freescale.com>:
> >>>
> >>>> -----Original Message-----
> >>>> From: Leon Woestenberg [mailto:leon.woestenberg@gmail.com]
> >>>> Sent: Thursday, April 07, 2011 10:50 PM
> >>>> To: linuxppc-dev@ozlabs.org
> >>>> Cc: Kumar Gala; Mahajan Vivek-B08308; Aggrwal Poonam-B10812; Felix
> >>>> Radensky; Kushwaha Prabhakar-B32579
> >>>> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
> >>>>
> >>>> Hello,
> >>>>
> >>>> On Thu, Dec 17, 2009 at 9:28 PM, Felix Radensky
> >>>> <felix@embedded-sol.com>
> >>>> wrote:
> >>>>> Kumar Gala wrote:
> >>>>>> On Dec 17, 2009, at 2:59 AM, Mahajan Vivek-B08308 wrote:
> >>>>>>>> Thanks a lot. If I understand you correctly, the only way I can
> >>>>>>>> get ath9k driver to work on this board using legacy interrupts
> >>>>>>>> is to wait for a hardware fix. Right ?
> >>>>>>>>
> >>>>>>> Correct
> >>>>>> I'm confused.  What's the issue with IRQ0 on the P2020RDB?  Is it
> >>>>>> used for another purpose?
> >>>>> There's a problem with IRQ0 with respect to mini-PCI-E slot. I
> >>>>> have Atheros wireless card plugged into it. ath9k wireless driver
> >>>>> for this card uses legacy PCI-E interrupts, and I get "irq 16:
> >>>>> nobody
> >> cared"
> >>>>> message when driver executes request_irq(). Vivek has come to a
> >>>>> conclusion that the problem is related to incorrect IRQ0 routing
> >>>>> for mini-PCI-E slot on P2020RDB.
> >>>>>
> >>>> I would like to understand this issue better, as I seem to be
> >>>> running into something similar, and it puts my board design on hold.
> >>>>
> >>>> Can someone (from Freescale) explain what happens if a PCI Express
> >>>> end point on the mini-PCIe slot raises a legacy interrupt, and
> >>>> where this goes wrong?
> >>>>
> >>>>  From what document or source code file can I conclude that the
> >>>> PCIe legacy interrupt is shared with IRQ0?
> >>>>
> >>>>
> >>>> I found this:
> >>>>
> >>>> P1020E/P2020E RDB System Errata, Last Update: 2/15/2010:
> >>>> Problem:IRQ0 held low
> >>>> Fix: Add 4.7K pull-up (to 3.3.V) for RTC_INT_N.
> >>>> See R420 in Rev D schematic.
> >>>> Add 4.7K pull-up (to 3.3.V) for MCU_INT_N.
> >>>> See R423 in Rev D schematic.
> >>>>
> >>>>
> >>> Hello Leon,
> >>>
> >>>   Yes you are right, PCIe leagacy interrupt is shared with IRQ0. For
> >> Atheros issue.
> >>>   Can you please try followings, Meanwhile I will try to dig into it.
> >>>
> >>> http://old.nabble.com/Problem-with-mini-PCI-E-slot-on-P2020RDB-td268
> >>> 02
> >>> 038.html
> >>>
> >>> Regarding sata_sil24, Please see my e-mail on Linux-ide for correct
> >> IDSEL value.
> >>> Please first try IDSEL value mentioned in email on Linux-ide. Then
> >>> try
> >> this URL..
> >>> --Prabhakar
> >>>
> >>> _______________________________________________
> >>> Linuxppc-dev mailing list
> >>> Linuxppc-dev@lists.ozlabs.org
> >>> https://lists.ozlabs.org/listinfo/linuxppc-dev
> >>>
> >

^ permalink raw reply

* Re: Problem with mini-PCI-E slot on P2020RDB
From: Felix Radensky @ 2011-04-11  8:39 UTC (permalink / raw)
  To: Kushwaha Prabhakar-B32579
  Cc: Mahajan Vivek-B08308, Aggrwal Poonam-B10812, Leon Woestenberg,
	linuxppc-dev@ozlabs.org, Gupta Maneesh-B18878, Fabian Bertholm
In-Reply-To: <071A08F2C6A57E4E94D980ECA553F87416F971@039-SN1MPN1-004.039d.mgd.msft.net>

Hi,

Assuming I have all patches in place, will this problem be
resolved on earlier board revisions (before rev D) ?

Felix.

On 04/11/2011 12:06 PM, Kushwaha Prabhakar-B32579 wrote:
> Hi Fabe,
>
> Yes .. P1020/P1011 RDB has same issue as of P2020RDB.
>
> It was because of some missing patches at u-boot and Linux.
>
> U-boot patch : It is already present in open source. Please use latest code base
> Linux patch : I am in process of posting in open source. Please make mentioned changes of IDSEL.
>
> --Prabhakar
>
>> -----Original Message-----
>> From: Fabian Bertholm [mailto:fabeisageek@googlemail.com]
>> Sent: Monday, April 11, 2011 1:53 PM
>> To: Kushwaha Prabhakar-B32579
>> Cc: Leon Woestenberg; linuxppc-dev@ozlabs.org; Mahajan Vivek-B08308;
>> Felix Radensky; Aggrwal Poonam-B10812; Gupta Maneesh-B18878
>> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>>
>> Hello Kushwaha Prabhakar,
>>
>> Our impression is that there is the same issue on the P1020/P1011 RDB.
>> Can you confirm this?
>>
>> Best Regards,
>> Fabe
>>
>>
>> 2011/4/8 Kushwaha Prabhakar-B32579<B32579@freescale.com>:
>>>
>>>> -----Original Message-----
>>>> From: Leon Woestenberg [mailto:leon.woestenberg@gmail.com]
>>>> Sent: Thursday, April 07, 2011 10:50 PM
>>>> To: linuxppc-dev@ozlabs.org
>>>> Cc: Kumar Gala; Mahajan Vivek-B08308; Aggrwal Poonam-B10812; Felix
>>>> Radensky; Kushwaha Prabhakar-B32579
>>>> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>>>>
>>>> Hello,
>>>>
>>>> On Thu, Dec 17, 2009 at 9:28 PM, Felix Radensky
>>>> <felix@embedded-sol.com>
>>>> wrote:
>>>>> Kumar Gala wrote:
>>>>>> On Dec 17, 2009, at 2:59 AM, Mahajan Vivek-B08308 wrote:
>>>>>>>> Thanks a lot. If I understand you correctly, the only way I can
>>>>>>>> get ath9k driver to work on this board using legacy interrupts
>>>>>>>> is to wait for a hardware fix. Right ?
>>>>>>>>
>>>>>>> Correct
>>>>>> I'm confused.  What's the issue with IRQ0 on the P2020RDB?  Is it
>>>>>> used for another purpose?
>>>>> There's a problem with IRQ0 with respect to mini-PCI-E slot. I have
>>>>> Atheros wireless card plugged into it. ath9k wireless driver for
>>>>> this card uses legacy PCI-E interrupts, and I get "irq 16: nobody
>> cared"
>>>>> message when driver executes request_irq(). Vivek has come to a
>>>>> conclusion that the problem is related to incorrect IRQ0 routing
>>>>> for mini-PCI-E slot on P2020RDB.
>>>>>
>>>> I would like to understand this issue better, as I seem to be running
>>>> into something similar, and it puts my board design on hold.
>>>>
>>>> Can someone (from Freescale) explain what happens if a PCI Express
>>>> end point on the mini-PCIe slot raises a legacy interrupt, and where
>>>> this goes wrong?
>>>>
>>>>  From what document or source code file can I conclude that the PCIe
>>>> legacy interrupt is shared with IRQ0?
>>>>
>>>>
>>>> I found this:
>>>>
>>>> P1020E/P2020E RDB System Errata, Last Update: 2/15/2010:
>>>> Problem:IRQ0 held low
>>>> Fix: Add 4.7K pull-up (to 3.3.V) for RTC_INT_N.
>>>> See R420 in Rev D schematic.
>>>> Add 4.7K pull-up (to 3.3.V) for MCU_INT_N.
>>>> See R423 in Rev D schematic.
>>>>
>>>>
>>> Hello Leon,
>>>
>>>   Yes you are right, PCIe leagacy interrupt is shared with IRQ0. For
>> Atheros issue.
>>>   Can you please try followings, Meanwhile I will try to dig into it.
>>>
>>> http://old.nabble.com/Problem-with-mini-PCI-E-slot-on-P2020RDB-td26802
>>> 038.html
>>>
>>> Regarding sata_sil24, Please see my e-mail on Linux-ide for correct
>> IDSEL value.
>>> Please first try IDSEL value mentioned in email on Linux-ide. Then try
>> this URL..
>>> --Prabhakar
>>>
>>> _______________________________________________
>>> Linuxppc-dev mailing list
>>> Linuxppc-dev@lists.ozlabs.org
>>> https://lists.ozlabs.org/listinfo/linuxppc-dev
>>>
>

^ permalink raw reply

* [PATCH 3/4] usb:fix a typo
From: Weiping Pan(潘卫平) @ 2011-04-11 10:16 UTC (permalink / raw)
  Cc: David Brownell, Weiping Pan  (=E6=BD=98=E5=8D=AB=E5=B9=B3),
	Greg Kroah-Hartman, open list, open list:FREESCALE USB PER...,
	open list:FREESCALE USB PER...

replace tranmitted with transmitted.

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
---
 drivers/usb/gadget/fsl_qe_udc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/fsl_qe_udc.h b/drivers/usb/gadget/fsl_qe_udc.h
index e35e24f..1da5fb0 100644
--- a/drivers/usb/gadget/fsl_qe_udc.h
+++ b/drivers/usb/gadget/fsl_qe_udc.h
@@ -207,7 +207,7 @@ struct qe_frame{
 
 /* Frame status field */
 /* Receive side */
-#define FRAME_OK               0x00000000 /* Frame tranmitted or received OK */
+#define FRAME_OK               0x00000000 /* Frame transmitted or received OK */
 #define FRAME_ERROR            0x80000000 /* Error occurred on frame */
 #define START_FRAME_LOST       0x40000000 /* START_FRAME_LOST */
 #define END_FRAME_LOST         0x20000000 /* END_FRAME_LOST */
-- 
1.7.4

^ permalink raw reply related

* RE: Problem with mini-PCI-E slot on P2020RDB
From: Kushwaha Prabhakar-B32579 @ 2011-04-11  9:06 UTC (permalink / raw)
  To: Fabian Bertholm
  Cc: Mahajan Vivek-B08308, Felix Radensky, Aggrwal Poonam-B10812,
	Leon Woestenberg, linuxppc-dev@ozlabs.org, Gupta Maneesh-B18878
In-Reply-To: <BANLkTi=QHOPTiuu2uXr1AcCXrpL3AT4cUw@mail.gmail.com>

Hi Fabe,

Yes .. P1020/P1011 RDB has same issue as of P2020RDB.

It was because of some missing patches at u-boot and Linux.

U-boot patch : It is already present in open source. Please use latest code=
 base
Linux patch : I am in process of posting in open source. Please make mentio=
ned changes of IDSEL.

--Prabhakar

> -----Original Message-----
> From: Fabian Bertholm [mailto:fabeisageek@googlemail.com]
> Sent: Monday, April 11, 2011 1:53 PM
> To: Kushwaha Prabhakar-B32579
> Cc: Leon Woestenberg; linuxppc-dev@ozlabs.org; Mahajan Vivek-B08308;
> Felix Radensky; Aggrwal Poonam-B10812; Gupta Maneesh-B18878
> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>=20
> Hello Kushwaha Prabhakar,
>=20
> Our impression is that there is the same issue on the P1020/P1011 RDB.
> Can you confirm this?
>=20
> Best Regards,
> Fabe
>=20
>=20
> 2011/4/8 Kushwaha Prabhakar-B32579 <B32579@freescale.com>:
> >
> >
> >> -----Original Message-----
> >> From: Leon Woestenberg [mailto:leon.woestenberg@gmail.com]
> >> Sent: Thursday, April 07, 2011 10:50 PM
> >> To: linuxppc-dev@ozlabs.org
> >> Cc: Kumar Gala; Mahajan Vivek-B08308; Aggrwal Poonam-B10812; Felix
> >> Radensky; Kushwaha Prabhakar-B32579
> >> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
> >>
> >> Hello,
> >>
> >> On Thu, Dec 17, 2009 at 9:28 PM, Felix Radensky
> >> <felix@embedded-sol.com>
> >> wrote:
> >> > Kumar Gala wrote:
> >> >> On Dec 17, 2009, at 2:59 AM, Mahajan Vivek-B08308 wrote:
> >> >>>> Thanks a lot. If I understand you correctly, the only way I can
> >> >>>> get ath9k driver to work on this board using legacy interrupts
> >> >>>> is to wait for a hardware fix. Right ?
> >> >>>>
> >> >>> Correct
> >> >>
> >> >> I'm confused. =A0What's the issue with IRQ0 on the P2020RDB? =A0Is =
it
> >> >> used for another purpose?
> >> >
> >> > There's a problem with IRQ0 with respect to mini-PCI-E slot. I have
> >> > Atheros wireless card plugged into it. ath9k wireless driver for
> >> > this card uses legacy PCI-E interrupts, and I get "irq 16: nobody
> cared"
> >> > message when driver executes request_irq(). Vivek has come to a
> >> > conclusion that the problem is related to incorrect IRQ0 routing
> >> > for mini-PCI-E slot on P2020RDB.
> >> >
> >>
> >> I would like to understand this issue better, as I seem to be running
> >> into something similar, and it puts my board design on hold.
> >>
> >> Can someone (from Freescale) explain what happens if a PCI Express
> >> end point on the mini-PCIe slot raises a legacy interrupt, and where
> >> this goes wrong?
> >>
> >> From what document or source code file can I conclude that the PCIe
> >> legacy interrupt is shared with IRQ0?
> >>
> >>
> >> I found this:
> >>
> >> P1020E/P2020E RDB System Errata, Last Update: 2/15/2010:
> >> Problem:IRQ0 held low
> >> Fix: Add 4.7K pull-up (to 3.3.V) for RTC_INT_N.
> >> See R420 in Rev D schematic.
> >> Add 4.7K pull-up (to 3.3.V) for MCU_INT_N.
> >> See R423 in Rev D schematic.
> >>
> >>
> >
> > Hello Leon,
> >
> > =A0Yes you are right, PCIe leagacy interrupt is shared with IRQ0. For
> Atheros issue.
> > =A0Can you please try followings, Meanwhile I will try to dig into it.
> >
> > http://old.nabble.com/Problem-with-mini-PCI-E-slot-on-P2020RDB-td26802
> > 038.html
> >
> > Regarding sata_sil24, Please see my e-mail on Linux-ide for correct
> IDSEL value.
> > Please first try IDSEL value mentioned in email on Linux-ide. Then try
> this URL..
> >
> > --Prabhakar
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev
> >

^ permalink raw reply

* Re: Problem with mini-PCI-E slot on P2020RDB
From: Fabian Bertholm @ 2011-04-11  8:23 UTC (permalink / raw)
  To: Kushwaha Prabhakar-B32579
  Cc: Mahajan Vivek-B08308, Felix Radensky, Aggrwal Poonam-B10812,
	Leon Woestenberg, linuxppc-dev@ozlabs.org, Gupta Maneesh-B18878
In-Reply-To: <071A08F2C6A57E4E94D980ECA553F87416D42F@039-SN1MPN1-004.039d.mgd.msft.net>

Hello Kushwaha Prabhakar,

Our impression is that there is the same issue on the P1020/P1011 RDB.
Can you confirm this?

Best Regards,
Fabe


2011/4/8 Kushwaha Prabhakar-B32579 <B32579@freescale.com>:
>
>
>> -----Original Message-----
>> From: Leon Woestenberg [mailto:leon.woestenberg@gmail.com]
>> Sent: Thursday, April 07, 2011 10:50 PM
>> To: linuxppc-dev@ozlabs.org
>> Cc: Kumar Gala; Mahajan Vivek-B08308; Aggrwal Poonam-B10812; Felix
>> Radensky; Kushwaha Prabhakar-B32579
>> Subject: Re: Problem with mini-PCI-E slot on P2020RDB
>>
>> Hello,
>>
>> On Thu, Dec 17, 2009 at 9:28 PM, Felix Radensky <felix@embedded-sol.com>
>> wrote:
>> > Kumar Gala wrote:
>> >> On Dec 17, 2009, at 2:59 AM, Mahajan Vivek-B08308 wrote:
>> >>>> Thanks a lot. If I understand you correctly, the only way I can get
>> >>>> ath9k driver to work on this board using legacy interrupts is to
>> >>>> wait for a hardware fix. Right ?
>> >>>>
>> >>> Correct
>> >>
>> >> I'm confused. =A0What's the issue with IRQ0 on the P2020RDB? =A0Is it
>> >> used for another purpose?
>> >
>> > There's a problem with IRQ0 with respect to mini-PCI-E slot. I have
>> > Atheros wireless card plugged into it. ath9k wireless driver for this
>> > card uses legacy PCI-E interrupts, and I get "irq 16: nobody cared"
>> > message when driver executes request_irq(). Vivek has come to a
>> > conclusion that the problem is related to incorrect IRQ0 routing for
>> > mini-PCI-E slot on P2020RDB.
>> >
>>
>> I would like to understand this issue better, as I seem to be running
>> into something similar, and it puts my board design on hold.
>>
>> Can someone (from Freescale) explain what happens if a PCI Express end
>> point on the mini-PCIe slot raises a legacy interrupt, and where this
>> goes wrong?
>>
>> From what document or source code file can I conclude that the PCIe
>> legacy interrupt is shared with IRQ0?
>>
>>
>> I found this:
>>
>> P1020E/P2020E RDB System Errata, Last Update: 2/15/2010:
>> Problem:IRQ0 held low
>> Fix: Add 4.7K pull-up (to 3.3.V) for RTC_INT_N.
>> See R420 in Rev D schematic.
>> Add 4.7K pull-up (to 3.3.V) for MCU_INT_N.
>> See R423 in Rev D schematic.
>>
>>
>
> Hello Leon,
>
> =A0Yes you are right, PCIe leagacy interrupt is shared with IRQ0. For Ath=
eros issue.
> =A0Can you please try followings, Meanwhile I will try to dig into it.
> =A0 http://old.nabble.com/Problem-with-mini-PCI-E-slot-on-P2020RDB-td2680=
2038.html
>
> Regarding sata_sil24, Please see my e-mail on Linux-ide for correct IDSEL=
 value.
> Please first try IDSEL value mentioned in email on Linux-ide. Then try th=
is URL..
>
> --Prabhakar
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>

^ permalink raw reply

* Re: [PATCH] fix build warnings on defconfigs
From: Igor Grinberg @ 2011-04-11  6:11 UTC (permalink / raw)
  To: wanlong.gao
  Cc: linux-mips, david.woodhouse, tony, nicolas.ferre, paulus, eric,
	sam, sfr, linux, khilman, manuel.lauss, u.kleine-koenig, mingo,
	rientjes, anton, ben-linux, linux-arm-kernel, linux-kernel, ralf,
	santosh.shilimkar, akpm, linuxppc-dev, hans-christian.egtvedt
In-Reply-To: <1302375858-11253-1-git-send-email-wanlong.gao@gmail.com>

On 04/09/11 22:04, wanlong.gao@gmail.com wrote:

> From: Wanlong Gao <wanlong.gao@gmail.com>
>
> Change the BT_L2CAP and BT_SCO defconfigs from 'm' to 'y',
> since BT_L2CAP and BT_SCO had changed to bool configs.
>
> Signed-off-by: Wanlong Gao <wanlong.gao@gmail.com>
> ---

For:

>  arch/arm/configs/cm_x2xx_defconfig         |    4 ++--
>  arch/arm/configs/cm_x300_defconfig         |    4 ++--
>  arch/arm/configs/em_x270_defconfig         |    4 ++--

Acked-by: Igor Grinberg <grinberg@compulab.co.il>

-- 
Regards,
Igor.

^ permalink raw reply

* [PATCH] powerpc: Look for ibm, associativity-reference-points at the root
From: Michael Ellerman @ 2011-04-11  6:42 UTC (permalink / raw)
  To: linuxppc-dev

If we don't find ibm,associativity-reference-points as a child of
/rtas, look for it at the root of the tree instead. We use this on
Book3E where we have no RTAS but still use the sPAPR conventions
for NUMA.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/mm/numa.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 0dc95c0..6e90986 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -311,14 +311,13 @@ EXPORT_SYMBOL_GPL(of_node_to_nid);
 static int __init find_min_common_depth(void)
 {
 	int depth;
-	struct device_node *rtas_root;
 	struct device_node *chosen;
+	struct device_node *root;
 	const char *vec5;
 
-	rtas_root = of_find_node_by_path("/rtas");
-
-	if (!rtas_root)
-		return -1;
+	root = of_find_node_by_path("/rtas");
+	if (!root)
+		root = of_find_node_by_path("/");
 
 	/*
 	 * This property is a set of 32-bit integers, each representing
@@ -332,7 +331,7 @@ static int __init find_min_common_depth(void)
 	 * NUMA boundary and the following are progressively less significant
 	 * boundaries. There can be more than one level of NUMA.
 	 */
-	distance_ref_points = of_get_property(rtas_root,
+	distance_ref_points = of_get_property(root,
 					"ibm,associativity-reference-points",
 					&distance_ref_points_depth);
 
@@ -376,11 +375,11 @@ static int __init find_min_common_depth(void)
 		distance_ref_points_depth = MAX_DISTANCE_REF_POINTS;
 	}
 
-	of_node_put(rtas_root);
+	of_node_put(root);
 	return depth;
 
 err:
-	of_node_put(rtas_root);
+	of_node_put(root);
 	return -1;
 }
 
-- 
1.7.1

^ permalink raw reply related

* [PATCH] driver/e1000e: Fix default interrupt mode select
From: Prabhakar Kushwaha @ 2011-04-11  6:38 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: meet2prabhu, Prabhakar, Jin Qing

From: Prabhakar <prabhakar@freescale.com>

e1000 default interrupt mode is MSI. No matter user select MSI or
disable MSI in kernel config.

Signed-off-by: Jin Qing <b24347@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 Based upon git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git(branch master)

 drivers/net/e1000e/param.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/e1000e/param.c b/drivers/net/e1000e/param.c
index a150e48..7b3bbec 100644
--- a/drivers/net/e1000e/param.c
+++ b/drivers/net/e1000e/param.c
@@ -390,7 +390,11 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
 			.type = range_option,
 			.name = "Interrupt Mode",
 			.err  = "defaulting to 2 (MSI-X)",
+#ifdef CONFIG_PCI_MSI
 			.def  = E1000E_INT_MODE_MSIX,
+#else
+			.def  = E1000E_INT_MODE_LEGACY,
+#endif
 			.arg  = { .r = { .min = MIN_INTMODE,
 					 .max = MAX_INTMODE } }
 		};
-- 
1.7.3

^ permalink raw reply related

* Re: [PATCH 2/4] powerpc/pci: Move IO workarounds to the common kernel dir
From: Stephen Rothwell @ 2011-04-11  6:38 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <5f157bce88237ae70829d2d6df1d792a69b7e02c.1302501428.git.michael@ellerman.id.au>

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

On Mon, 11 Apr 2011 15:54:28 +1000 (EST) Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> index 220b137..44059e1 100644
> --- a/arch/powerpc/platforms/Kconfig
> +++ b/arch/powerpc/platforms/Kconfig
> @@ -162,6 +162,9 @@ config PPC_INDIRECT_PIO
>  config PPC_INDIRECT_MEM
>  	def_bool n
>  
> +config PPC_IO_WORKAROUNDS
> +	def_bool n
> +

Just "bool"

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

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

^ permalink raw reply

* Re: [PATCH 1/4] powerpc/pci: Split IO vs MMIO indirect access hooks
From: Stephen Rothwell @ 2011-04-11  6:35 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <3ed7c174af4ccbab67467aa80fe84bd6c6e218ee.1302501428.git.michael@ellerman.id.au>

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

Hi Ben,

Just a small note:

On Mon, 11 Apr 2011 15:54:27 +1000 (EST) Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> index 59eeb77..220b137 100644
> --- a/arch/powerpc/platforms/Kconfig
> +++ b/arch/powerpc/platforms/Kconfig
> @@ -152,13 +152,18 @@ config PPC_P7_NAP
>  	default n
>  
>  config PPC_INDIRECT_IO
> -	bool
> +	def_bool y
>  	select GENERIC_IOMAP
> -	default n
> +	depends on PPC_INDIRECT_PIO || PPC_INDIRECT_MMIO

config PPC_INDIRECT_IO
	bool
	select GENERIC_IOMAP

> +config PPC_INDIRECT_PIO
> +	def_bool n

config PPC_INDIRECT_PIO
	bool
	select PPC_INDIRECT_IO

> +config PPC_INDIRECT_MEM
> +	def_bool n

config PPC_INDIRECT_MEM
	bool
	select PPC_INDIRECT_IO

>  config GENERIC_IOMAP
> -	bool
> -	default n
> +	def_bool n

Just remove the "defaul n"  (or leave it alobe).

The default for bool is 'n'.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

^ permalink raw reply

* [PATCH] powerpc: Standardise on MMU_NO_CONTEXT
From: Michael Ellerman @ 2011-04-11  6:35 UTC (permalink / raw)
  To: linuxppc-dev

Use MMU_NO_CONTEXT as the initialiser for mm_context.id on book3e
and hash64.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/include/asm/mmu-book3e.h |    2 ++
 arch/powerpc/include/asm/mmu-hash64.h |    2 ++
 arch/powerpc/include/asm/tlbflush.h   |    2 --
 arch/powerpc/mm/mmu_context_hash64.c  |    3 +--
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/include/asm/mmu-book3e.h b/arch/powerpc/include/asm/mmu-book3e.h
index 17194fc..f6e7d40 100644
--- a/arch/powerpc/include/asm/mmu-book3e.h
+++ b/arch/powerpc/include/asm/mmu-book3e.h
@@ -192,6 +192,8 @@
 
 extern unsigned int tlbcam_index;
 
+#define MMU_NO_CONTEXT      	((unsigned int)-1)
+
 typedef struct {
 	unsigned int	id;
 	unsigned int	active;
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
index ae7b3ef..b589189 100644
--- a/arch/powerpc/include/asm/mmu-hash64.h
+++ b/arch/powerpc/include/asm/mmu-hash64.h
@@ -409,6 +409,8 @@ static inline void subpage_prot_init_new_context(struct mm_struct *mm) { }
 
 typedef unsigned long mm_context_id_t;
 
+#define MMU_NO_CONTEXT	0
+
 typedef struct {
 	mm_context_id_t id;
 	u16 user_psize;		/* page size index */
diff --git a/arch/powerpc/include/asm/tlbflush.h b/arch/powerpc/include/asm/tlbflush.h
index d50a380..852b139 100644
--- a/arch/powerpc/include/asm/tlbflush.h
+++ b/arch/powerpc/include/asm/tlbflush.h
@@ -32,8 +32,6 @@
 struct vm_area_struct;
 struct mm_struct;
 
-#define MMU_NO_CONTEXT      	((unsigned int)-1)
-
 extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
 			    unsigned long end);
 extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
diff --git a/arch/powerpc/mm/mmu_context_hash64.c b/arch/powerpc/mm/mmu_context_hash64.c
index 2535828..c585944 100644
--- a/arch/powerpc/mm/mmu_context_hash64.c
+++ b/arch/powerpc/mm/mmu_context_hash64.c
@@ -31,7 +31,6 @@ static DEFINE_IDA(mmu_context_ida);
  * Each segment contains 2^28 bytes.  Each context maps 2^44 bytes,
  * so we can support 2^19-1 contexts (19 == 35 + 28 - 44).
  */
-#define NO_CONTEXT	0
 #define MAX_CONTEXT	((1UL << 19) - 1)
 
 int __init_new_context(void)
@@ -95,5 +94,5 @@ void destroy_context(struct mm_struct *mm)
 {
 	__destroy_context(mm->context.id);
 	subpage_prot_free(mm);
-	mm->context.id = NO_CONTEXT;
+	mm->context.id = MMU_NO_CONTEXT;
 }
-- 
1.7.1

^ permalink raw reply related

* [PATCH] powerpc: Dump chip data pointer in virq_mapping
From: Michael Ellerman @ 2011-04-11  6:26 UTC (permalink / raw)
  To: linuxppc-dev

This can be useful for differentiating interrupts on the same host
but with different chip data.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/kernel/irq.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index f621b7d..ac32ba1 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -1082,10 +1082,11 @@ static int virq_debug_show(struct seq_file *m, void *private)
 	struct irq_desc *desc;
 	const char *p;
 	static const char none[] = "none";
+	void *data;
 	int i;
 
-	seq_printf(m, "%-5s  %-7s  %-15s  %s\n", "virq", "hwirq",
-		      "chip name", "host name");
+	seq_printf(m, "%-5s  %-7s  %-15s  %-18s  %s\n", "virq", "hwirq",
+		      "chip name", "chip data", "host name");
 
 	for (i = 1; i < nr_irqs; i++) {
 		desc = irq_to_desc(i);
@@ -1107,6 +1108,9 @@ static int virq_debug_show(struct seq_file *m, void *private)
 				p = none;
 			seq_printf(m, "%-15s  ", p);
 
+			data = irq_desc_get_chip_data(desc);
+			seq_printf(m, "0x%16p  ", data);
+
 			if (irq_map[i].host && irq_map[i].host->of_node)
 				p = irq_map[i].host->of_node->full_name;
 			else
-- 
1.7.1

^ permalink raw reply related

* [PATCH 4/4] powerpc/pci: Properly initialize IO workaround "private"
From: Benjamin Herrenschmidt @ 2011-04-11  5:54 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <3ed7c174af4ccbab67467aa80fe84bd6c6e218ee.1302501428.git.michael@ellerman.id.au>

Even when no initfunc is provided.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/kernel/io-workarounds.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/io-workarounds.c b/arch/powerpc/kernel/io-workarounds.c
index d36515e..ffafaea 100644
--- a/arch/powerpc/kernel/io-workarounds.c
+++ b/arch/powerpc/kernel/io-workarounds.c
@@ -175,6 +175,7 @@ void __devinit iowa_register_bus(struct pci_controller *phb,
 	bus = &iowa_busses[iowa_bus_count];
 	bus->phb = phb;
 	bus->ops = ops;
+	bus->private = data;
 
 	if (initfunc)
 		if ((*initfunc)(bus, data))
-- 
1.7.1

^ permalink raw reply related

* [PATCH 3/4] powerpc/pci: Make IO workarounds init implicit when first bus is registered
From: Benjamin Herrenschmidt @ 2011-04-11  5:54 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <3ed7c174af4ccbab67467aa80fe84bd6c6e218ee.1302501428.git.michael@ellerman.id.au>

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/include/asm/io-workarounds.h |    1 -
 arch/powerpc/kernel/io-workarounds.c      |   27 +++++++++++++++------------
 arch/powerpc/platforms/cell/celleb_pci.c  |   18 +++++-------------
 arch/powerpc/platforms/cell/setup.c       |    2 --
 4 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/arch/powerpc/include/asm/io-workarounds.h b/arch/powerpc/include/asm/io-workarounds.h
index 6efc778..fbae492 100644
--- a/arch/powerpc/include/asm/io-workarounds.h
+++ b/arch/powerpc/include/asm/io-workarounds.h
@@ -31,7 +31,6 @@ struct iowa_bus {
 	void   *private;
 };
 
-void __devinit io_workaround_init(void);
 void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *,
 				 int (*)(struct iowa_bus *, void *), void *);
 struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR);
diff --git a/arch/powerpc/kernel/io-workarounds.c b/arch/powerpc/kernel/io-workarounds.c
index 7e58457..d36515e 100644
--- a/arch/powerpc/kernel/io-workarounds.c
+++ b/arch/powerpc/kernel/io-workarounds.c
@@ -144,7 +144,19 @@ static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
 	return res;
 }
 
-/* Regist new bus to support workaround */
+/* Enable IO workaround */
+static void __devinit io_workaround_init(void)
+{
+	static int io_workaround_inited;
+
+	if (io_workaround_inited)
+		return;
+	ppc_pci_io = iowa_pci_io;
+	ppc_md.ioremap = iowa_ioremap;
+	io_workaround_inited = 1;
+}
+
+/* Register new bus to support workaround */
 void __devinit iowa_register_bus(struct pci_controller *phb,
 			struct ppc_pci_io *ops,
 			int (*initfunc)(struct iowa_bus *, void *), void *data)
@@ -152,6 +164,8 @@ void __devinit iowa_register_bus(struct pci_controller *phb,
 	struct iowa_bus *bus;
 	struct device_node *np = phb->dn;
 
+	io_workaround_init();
+
 	if (iowa_bus_count >= IOWA_MAX_BUS) {
 		pr_err("IOWA:Too many pci bridges, "
 		       "workarounds disabled for %s\n", np->full_name);
@@ -171,14 +185,3 @@ void __devinit iowa_register_bus(struct pci_controller *phb,
 	pr_debug("IOWA:[%d]Add bus, %s.\n", iowa_bus_count-1, np->full_name);
 }
 
-/* enable IO workaround */
-void __devinit io_workaround_init(void)
-{
-	static int io_workaround_inited;
-
-	if (io_workaround_inited)
-		return;
-	ppc_pci_io = iowa_pci_io;
-	ppc_md.ioremap = iowa_ioremap;
-	io_workaround_inited = 1;
-}
diff --git a/arch/powerpc/platforms/cell/celleb_pci.c b/arch/powerpc/platforms/cell/celleb_pci.c
index c19b783..2904b0a 100644
--- a/arch/powerpc/platforms/cell/celleb_pci.c
+++ b/arch/powerpc/platforms/cell/celleb_pci.c
@@ -468,18 +468,6 @@ static struct of_device_id celleb_phb_match[] __initdata = {
 	},
 };
 
-static int __init celleb_io_workaround_init(struct pci_controller *phb,
-					    struct celleb_phb_spec *phb_spec)
-{
-	if (phb_spec->ops) {
-		iowa_register_bus(phb, phb_spec->ops, phb_spec->iowa_init,
-				  phb_spec->iowa_data);
-		io_workaround_init();
-	}
-
-	return 0;
-}
-
 int __init celleb_setup_phb(struct pci_controller *phb)
 {
 	struct device_node *dev = phb->dn;
@@ -499,7 +487,11 @@ int __init celleb_setup_phb(struct pci_controller *phb)
 	if (rc)
 		return 1;
 
-	return celleb_io_workaround_init(phb, phb_spec);
+	if (phb_spec->ops)
+		iowa_register_bus(phb, phb_spec->ops,
+				  phb_spec->iowa_init,
+				  phb_spec->iowa_data);
+	return 0;
 }
 
 int celleb_pci_probe_mode(struct pci_bus *bus)
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index af7b13c..c73cf4c 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -136,8 +136,6 @@ static int __devinit cell_setup_phb(struct pci_controller *phb)
 
 	iowa_register_bus(phb, &spiderpci_ops, &spiderpci_iowa_init,
 				  (void *)SPIDER_PCI_REG_BASE);
-	io_workaround_init();
-
 	return 0;
 }
 
-- 
1.7.1

^ permalink raw reply related

* [PATCH 2/4] powerpc/pci: Move IO workarounds to the common kernel dir
From: Benjamin Herrenschmidt @ 2011-04-11  5:54 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <3ed7c174af4ccbab67467aa80fe84bd6c6e218ee.1302501428.git.michael@ellerman.id.au>

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/include/asm/io-workarounds.h    |   49 +++++++
 arch/powerpc/kernel/Makefile                 |    2 +
 arch/powerpc/kernel/io-workarounds.c         |  184 +++++++++++++++++++++++++
 arch/powerpc/platforms/Kconfig               |    3 +
 arch/powerpc/platforms/cell/Kconfig          |    1 +
 arch/powerpc/platforms/cell/Makefile         |    8 +-
 arch/powerpc/platforms/cell/celleb_pci.c     |    1 -
 arch/powerpc/platforms/cell/celleb_pci.h     |    3 +-
 arch/powerpc/platforms/cell/io-workarounds.c |  185 --------------------------
 arch/powerpc/platforms/cell/io-workarounds.h |   49 -------
 arch/powerpc/platforms/cell/qpace_setup.c    |    1 -
 arch/powerpc/platforms/cell/setup.c          |    2 +-
 arch/powerpc/platforms/cell/spider-pci.c     |    3 +-
 13 files changed, 247 insertions(+), 244 deletions(-)

diff --git a/arch/powerpc/include/asm/io-workarounds.h b/arch/powerpc/include/asm/io-workarounds.h
new file mode 100644
index 0000000..6efc778
--- /dev/null
+++ b/arch/powerpc/include/asm/io-workarounds.h
@@ -0,0 +1,49 @@
+/*
+ * Support PCI IO workaround
+ *
+ * (C) Copyright 2007-2008 TOSHIBA CORPORATION
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _IO_WORKAROUNDS_H
+#define _IO_WORKAROUNDS_H
+
+#include <linux/io.h>
+#include <asm/pci-bridge.h>
+
+/* Bus info */
+struct iowa_bus {
+	struct pci_controller *phb;
+	struct ppc_pci_io *ops;
+	void   *private;
+};
+
+void __devinit io_workaround_init(void);
+void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *,
+				 int (*)(struct iowa_bus *, void *), void *);
+struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR);
+struct iowa_bus *iowa_pio_find_bus(unsigned long);
+
+extern struct ppc_pci_io spiderpci_ops;
+extern int spiderpci_iowa_init(struct iowa_bus *, void *);
+
+#define SPIDER_PCI_REG_BASE		0xd000
+#define SPIDER_PCI_REG_SIZE		0x1000
+#define SPIDER_PCI_VCI_CNTL_STAT	0x0110
+#define SPIDER_PCI_DUMMY_READ		0x0810
+#define SPIDER_PCI_DUMMY_READ_BASE	0x0814
+
+#endif /* _IO_WORKAROUNDS_H */
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 0fd6273..b0ba78f 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -105,6 +105,8 @@ obj-$(CONFIG_KEXEC)		+= machine_kexec.o crash.o \
 obj-$(CONFIG_AUDIT)		+= audit.o
 obj64-$(CONFIG_AUDIT)		+= compat_audit.o
 
+obj-$(CONFIG_PPC_IO_WORKAROUNDS)	+= io-workarounds.o
+
 obj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o
 obj-$(CONFIG_FUNCTION_GRAPH_TRACER)	+= ftrace.o
 obj-$(CONFIG_PERF_EVENTS)	+= perf_callchain.o
diff --git a/arch/powerpc/kernel/io-workarounds.c b/arch/powerpc/kernel/io-workarounds.c
new file mode 100644
index 0000000..7e58457
--- /dev/null
+++ b/arch/powerpc/kernel/io-workarounds.c
@@ -0,0 +1,184 @@
+/*
+ * Support PCI IO workaround
+ *
+ *  Copyright (C) 2006 Benjamin Herrenschmidt <benh@kernel.crashing.org>
+ *		       IBM, Corp.
+ *  (C) Copyright 2007-2008 TOSHIBA CORPORATION
+ *
+ * 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.
+ */
+#undef DEBUG
+
+#include <linux/kernel.h>
+
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/pgtable.h>
+#include <asm/ppc-pci.h>
+#include <asm/io-workarounds.h>
+
+#define IOWA_MAX_BUS	8
+
+static struct iowa_bus iowa_busses[IOWA_MAX_BUS];
+static unsigned int iowa_bus_count;
+
+static struct iowa_bus *iowa_pci_find(unsigned long vaddr, unsigned long paddr)
+{
+	int i, j;
+	struct resource *res;
+	unsigned long vstart, vend;
+
+	for (i = 0; i < iowa_bus_count; i++) {
+		struct iowa_bus *bus = &iowa_busses[i];
+		struct pci_controller *phb = bus->phb;
+
+		if (vaddr) {
+			vstart = (unsigned long)phb->io_base_virt;
+			vend = vstart + phb->pci_io_size - 1;
+			if ((vaddr >= vstart) && (vaddr <= vend))
+				return bus;
+		}
+
+		if (paddr)
+			for (j = 0; j < 3; j++) {
+				res = &phb->mem_resources[j];
+				if (paddr >= res->start && paddr <= res->end)
+					return bus;
+			}
+	}
+
+	return NULL;
+}
+
+struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR addr)
+{
+	struct iowa_bus *bus;
+	int token;
+
+	token = PCI_GET_ADDR_TOKEN(addr);
+
+	if (token && token <= iowa_bus_count)
+		bus = &iowa_busses[token - 1];
+	else {
+		unsigned long vaddr, paddr;
+		pte_t *ptep;
+
+		vaddr = (unsigned long)PCI_FIX_ADDR(addr);
+		if (vaddr < PHB_IO_BASE || vaddr >= PHB_IO_END)
+			return NULL;
+
+		ptep = find_linux_pte(init_mm.pgd, vaddr);
+		if (ptep == NULL)
+			paddr = 0;
+		else
+			paddr = pte_pfn(*ptep) << PAGE_SHIFT;
+		bus = iowa_pci_find(vaddr, paddr);
+
+		if (bus == NULL)
+			return NULL;
+	}
+
+	return bus;
+}
+
+struct iowa_bus *iowa_pio_find_bus(unsigned long port)
+{
+	unsigned long vaddr = (unsigned long)pci_io_base + port;
+	return iowa_pci_find(vaddr, 0);
+}
+
+
+#define DEF_PCI_AC_RET(name, ret, at, al, space, aa)		\
+static ret iowa_##name at					\
+{								\
+	struct iowa_bus *bus;					\
+	bus = iowa_##space##_find_bus(aa);			\
+	if (bus && bus->ops && bus->ops->name)			\
+		return bus->ops->name al;			\
+	return __do_##name al;					\
+}
+
+#define DEF_PCI_AC_NORET(name, at, al, space, aa)		\
+static void iowa_##name at					\
+{								\
+	struct iowa_bus *bus;					\
+	bus = iowa_##space##_find_bus(aa);			\
+	if (bus && bus->ops && bus->ops->name) {		\
+		bus->ops->name al;				\
+		return;						\
+	}							\
+	__do_##name al;						\
+}
+
+#include <asm/io-defs.h>
+
+#undef DEF_PCI_AC_RET
+#undef DEF_PCI_AC_NORET
+
+static const struct ppc_pci_io __devinitconst iowa_pci_io = {
+
+#define DEF_PCI_AC_RET(name, ret, at, al, space, aa)	.name = iowa_##name,
+#define DEF_PCI_AC_NORET(name, at, al, space, aa)	.name = iowa_##name,
+
+#include <asm/io-defs.h>
+
+#undef DEF_PCI_AC_RET
+#undef DEF_PCI_AC_NORET
+
+};
+
+static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
+				  unsigned long flags, void *caller)
+{
+	struct iowa_bus *bus;
+	void __iomem *res = __ioremap_caller(addr, size, flags, caller);
+	int busno;
+
+	bus = iowa_pci_find(0, (unsigned long)addr);
+	if (bus != NULL) {
+		busno = bus - iowa_busses;
+		PCI_SET_ADDR_TOKEN(res, busno + 1);
+	}
+	return res;
+}
+
+/* Regist new bus to support workaround */
+void __devinit iowa_register_bus(struct pci_controller *phb,
+			struct ppc_pci_io *ops,
+			int (*initfunc)(struct iowa_bus *, void *), void *data)
+{
+	struct iowa_bus *bus;
+	struct device_node *np = phb->dn;
+
+	if (iowa_bus_count >= IOWA_MAX_BUS) {
+		pr_err("IOWA:Too many pci bridges, "
+		       "workarounds disabled for %s\n", np->full_name);
+		return;
+	}
+
+	bus = &iowa_busses[iowa_bus_count];
+	bus->phb = phb;
+	bus->ops = ops;
+
+	if (initfunc)
+		if ((*initfunc)(bus, data))
+			return;
+
+	iowa_bus_count++;
+
+	pr_debug("IOWA:[%d]Add bus, %s.\n", iowa_bus_count-1, np->full_name);
+}
+
+/* enable IO workaround */
+void __devinit io_workaround_init(void)
+{
+	static int io_workaround_inited;
+
+	if (io_workaround_inited)
+		return;
+	ppc_pci_io = iowa_pci_io;
+	ppc_md.ioremap = iowa_ioremap;
+	io_workaround_inited = 1;
+}
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 220b137..44059e1 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -162,6 +162,9 @@ config PPC_INDIRECT_PIO
 config PPC_INDIRECT_MEM
 	def_bool n
 
+config PPC_IO_WORKAROUNDS
+	def_bool n
+
 config GENERIC_IOMAP
 	def_bool n
 
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index 3c7f1de..67d5009 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -16,6 +16,7 @@ config PPC_CELL_NATIVE
 	bool
 	select PPC_CELL_COMMON
 	select MPIC
+	select PPC_IO_WORKAROUNDS
 	select IBM_NEW_EMAC_EMAC4
 	select IBM_NEW_EMAC_RGMII
 	select IBM_NEW_EMAC_ZMII #test only
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile
index 83fafe9..8839ef6 100644
--- a/arch/powerpc/platforms/cell/Makefile
+++ b/arch/powerpc/platforms/cell/Makefile
@@ -1,7 +1,7 @@
 obj-$(CONFIG_PPC_CELL_COMMON)		+= cbe_regs.o interrupt.o pervasive.o
 
 obj-$(CONFIG_PPC_CELL_NATIVE)		+= iommu.o setup.o spider-pic.o \
-					   pmu.o io-workarounds.o spider-pci.o
+					   pmu.o spider-pci.o
 obj-$(CONFIG_CBE_RAS)			+= ras.o
 
 obj-$(CONFIG_CBE_THERM)			+= cbe_thermal.o
@@ -39,9 +39,9 @@ obj-y					+= celleb_setup.o \
 					   celleb_pci.o celleb_scc_epci.o \
 					   celleb_scc_pciex.o \
 					   celleb_scc_uhc.o \
-					   io-workarounds.o spider-pci.o \
-					   beat.o beat_htab.o beat_hvCall.o \
-					   beat_interrupt.o beat_iommu.o
+					   spider-pci.o beat.o beat_htab.o \
+					   beat_hvCall.o beat_interrupt.o \
+					   beat_iommu.o
 
 obj-$(CONFIG_SMP)			+= beat_smp.o
 obj-$(CONFIG_PPC_UDBG_BEAT)		+= beat_udbg.o
diff --git a/arch/powerpc/platforms/cell/celleb_pci.c b/arch/powerpc/platforms/cell/celleb_pci.c
index 404d1fc..c19b783 100644
--- a/arch/powerpc/platforms/cell/celleb_pci.c
+++ b/arch/powerpc/platforms/cell/celleb_pci.c
@@ -41,7 +41,6 @@
 #include <asm/pci-bridge.h>
 #include <asm/ppc-pci.h>
 
-#include "io-workarounds.h"
 #include "celleb_pci.h"
 
 #define MAX_PCI_DEVICES    32
diff --git a/arch/powerpc/platforms/cell/celleb_pci.h b/arch/powerpc/platforms/cell/celleb_pci.h
index 4cba152..a801fcc 100644
--- a/arch/powerpc/platforms/cell/celleb_pci.h
+++ b/arch/powerpc/platforms/cell/celleb_pci.h
@@ -26,8 +26,9 @@
 #include <asm/pci-bridge.h>
 #include <asm/prom.h>
 #include <asm/ppc-pci.h>
+#include <asm/io-workarounds.h>
 
-#include "io-workarounds.h"
+struct iowa_bus;
 
 struct celleb_phb_spec {
 	int (*setup)(struct device_node *, struct pci_controller *);
diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c
deleted file mode 100644
index 5c1118e..0000000
--- a/arch/powerpc/platforms/cell/io-workarounds.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Support PCI IO workaround
- *
- *  Copyright (C) 2006 Benjamin Herrenschmidt <benh@kernel.crashing.org>
- *		       IBM, Corp.
- *  (C) Copyright 2007-2008 TOSHIBA CORPORATION
- *
- * 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.
- */
-#undef DEBUG
-
-#include <linux/kernel.h>
-
-#include <asm/io.h>
-#include <asm/machdep.h>
-#include <asm/pgtable.h>
-#include <asm/ppc-pci.h>
-
-#include "io-workarounds.h"
-
-#define IOWA_MAX_BUS	8
-
-static struct iowa_bus iowa_busses[IOWA_MAX_BUS];
-static unsigned int iowa_bus_count;
-
-static struct iowa_bus *iowa_pci_find(unsigned long vaddr, unsigned long paddr)
-{
-	int i, j;
-	struct resource *res;
-	unsigned long vstart, vend;
-
-	for (i = 0; i < iowa_bus_count; i++) {
-		struct iowa_bus *bus = &iowa_busses[i];
-		struct pci_controller *phb = bus->phb;
-
-		if (vaddr) {
-			vstart = (unsigned long)phb->io_base_virt;
-			vend = vstart + phb->pci_io_size - 1;
-			if ((vaddr >= vstart) && (vaddr <= vend))
-				return bus;
-		}
-
-		if (paddr)
-			for (j = 0; j < 3; j++) {
-				res = &phb->mem_resources[j];
-				if (paddr >= res->start && paddr <= res->end)
-					return bus;
-			}
-	}
-
-	return NULL;
-}
-
-struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR addr)
-{
-	struct iowa_bus *bus;
-	int token;
-
-	token = PCI_GET_ADDR_TOKEN(addr);
-
-	if (token && token <= iowa_bus_count)
-		bus = &iowa_busses[token - 1];
-	else {
-		unsigned long vaddr, paddr;
-		pte_t *ptep;
-
-		vaddr = (unsigned long)PCI_FIX_ADDR(addr);
-		if (vaddr < PHB_IO_BASE || vaddr >= PHB_IO_END)
-			return NULL;
-
-		ptep = find_linux_pte(init_mm.pgd, vaddr);
-		if (ptep == NULL)
-			paddr = 0;
-		else
-			paddr = pte_pfn(*ptep) << PAGE_SHIFT;
-		bus = iowa_pci_find(vaddr, paddr);
-
-		if (bus == NULL)
-			return NULL;
-	}
-
-	return bus;
-}
-
-struct iowa_bus *iowa_pio_find_bus(unsigned long port)
-{
-	unsigned long vaddr = (unsigned long)pci_io_base + port;
-	return iowa_pci_find(vaddr, 0);
-}
-
-
-#define DEF_PCI_AC_RET(name, ret, at, al, space, aa)		\
-static ret iowa_##name at					\
-{								\
-	struct iowa_bus *bus;					\
-	bus = iowa_##space##_find_bus(aa);			\
-	if (bus && bus->ops && bus->ops->name)			\
-		return bus->ops->name al;			\
-	return __do_##name al;					\
-}
-
-#define DEF_PCI_AC_NORET(name, at, al, space, aa)		\
-static void iowa_##name at					\
-{								\
-	struct iowa_bus *bus;					\
-	bus = iowa_##space##_find_bus(aa);			\
-	if (bus && bus->ops && bus->ops->name) {		\
-		bus->ops->name al;				\
-		return;						\
-	}							\
-	__do_##name al;						\
-}
-
-#include <asm/io-defs.h>
-
-#undef DEF_PCI_AC_RET
-#undef DEF_PCI_AC_NORET
-
-static const struct ppc_pci_io __devinitconst iowa_pci_io = {
-
-#define DEF_PCI_AC_RET(name, ret, at, al, space, aa)	.name = iowa_##name,
-#define DEF_PCI_AC_NORET(name, at, al, space, aa)	.name = iowa_##name,
-
-#include <asm/io-defs.h>
-
-#undef DEF_PCI_AC_RET
-#undef DEF_PCI_AC_NORET
-
-};
-
-static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
-				  unsigned long flags, void *caller)
-{
-	struct iowa_bus *bus;
-	void __iomem *res = __ioremap_caller(addr, size, flags, caller);
-	int busno;
-
-	bus = iowa_pci_find(0, (unsigned long)addr);
-	if (bus != NULL) {
-		busno = bus - iowa_busses;
-		PCI_SET_ADDR_TOKEN(res, busno + 1);
-	}
-	return res;
-}
-
-/* Regist new bus to support workaround */
-void __devinit iowa_register_bus(struct pci_controller *phb,
-			struct ppc_pci_io *ops,
-			int (*initfunc)(struct iowa_bus *, void *), void *data)
-{
-	struct iowa_bus *bus;
-	struct device_node *np = phb->dn;
-
-	if (iowa_bus_count >= IOWA_MAX_BUS) {
-		pr_err("IOWA:Too many pci bridges, "
-		       "workarounds disabled for %s\n", np->full_name);
-		return;
-	}
-
-	bus = &iowa_busses[iowa_bus_count];
-	bus->phb = phb;
-	bus->ops = ops;
-
-	if (initfunc)
-		if ((*initfunc)(bus, data))
-			return;
-
-	iowa_bus_count++;
-
-	pr_debug("IOWA:[%d]Add bus, %s.\n", iowa_bus_count-1, np->full_name);
-}
-
-/* enable IO workaround */
-void __devinit io_workaround_init(void)
-{
-	static int io_workaround_inited;
-
-	if (io_workaround_inited)
-		return;
-	ppc_pci_io = iowa_pci_io;
-	ppc_md.ioremap = iowa_ioremap;
-	io_workaround_inited = 1;
-}
diff --git a/arch/powerpc/platforms/cell/io-workarounds.h b/arch/powerpc/platforms/cell/io-workarounds.h
deleted file mode 100644
index 6efc778..0000000
--- a/arch/powerpc/platforms/cell/io-workarounds.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Support PCI IO workaround
- *
- * (C) Copyright 2007-2008 TOSHIBA CORPORATION
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef _IO_WORKAROUNDS_H
-#define _IO_WORKAROUNDS_H
-
-#include <linux/io.h>
-#include <asm/pci-bridge.h>
-
-/* Bus info */
-struct iowa_bus {
-	struct pci_controller *phb;
-	struct ppc_pci_io *ops;
-	void   *private;
-};
-
-void __devinit io_workaround_init(void);
-void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *,
-				 int (*)(struct iowa_bus *, void *), void *);
-struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR);
-struct iowa_bus *iowa_pio_find_bus(unsigned long);
-
-extern struct ppc_pci_io spiderpci_ops;
-extern int spiderpci_iowa_init(struct iowa_bus *, void *);
-
-#define SPIDER_PCI_REG_BASE		0xd000
-#define SPIDER_PCI_REG_SIZE		0x1000
-#define SPIDER_PCI_VCI_CNTL_STAT	0x0110
-#define SPIDER_PCI_DUMMY_READ		0x0810
-#define SPIDER_PCI_DUMMY_READ_BASE	0x0814
-
-#endif /* _IO_WORKAROUNDS_H */
diff --git a/arch/powerpc/platforms/cell/qpace_setup.c b/arch/powerpc/platforms/cell/qpace_setup.c
index d31c594..51e2901 100644
--- a/arch/powerpc/platforms/cell/qpace_setup.c
+++ b/arch/powerpc/platforms/cell/qpace_setup.c
@@ -42,7 +42,6 @@
 #include "interrupt.h"
 #include "pervasive.h"
 #include "ras.h"
-#include "io-workarounds.h"
 
 static void qpace_show_cpuinfo(struct seq_file *m)
 {
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index fd57bfe..af7b13c 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -51,11 +51,11 @@
 #include <asm/udbg.h>
 #include <asm/mpic.h>
 #include <asm/cell-regs.h>
+#include <asm/io-workarounds.h>
 
 #include "interrupt.h"
 #include "pervasive.h"
 #include "ras.h"
-#include "io-workarounds.h"
 
 #ifdef DEBUG
 #define DBG(fmt...) udbg_printf(fmt)
diff --git a/arch/powerpc/platforms/cell/spider-pci.c b/arch/powerpc/platforms/cell/spider-pci.c
index ca7731c..f1f7878 100644
--- a/arch/powerpc/platforms/cell/spider-pci.c
+++ b/arch/powerpc/platforms/cell/spider-pci.c
@@ -27,8 +27,7 @@
 
 #include <asm/ppc-pci.h>
 #include <asm/pci-bridge.h>
-
-#include "io-workarounds.h"
+#include <asm/io-workarounds.h>
 
 #define SPIDER_PCI_DISABLE_PREFETCH
 
-- 
1.7.1

^ permalink raw reply related

* [PATCH 1/4] powerpc/pci: Split IO vs MMIO indirect access hooks
From: Benjamin Herrenschmidt @ 2011-04-11  5:54 UTC (permalink / raw)
  To: linuxppc-dev

The goal is to avoid adding overhead to MMIO when only PIO is needed

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/include/asm/io.h          |   16 +++++++++++-----
 arch/powerpc/platforms/Kconfig         |   13 +++++++++----
 arch/powerpc/platforms/cell/Kconfig    |    3 ++-
 arch/powerpc/platforms/iseries/Kconfig |    3 ++-
 4 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index 001f2f1..2f365f5 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -481,10 +481,16 @@ __do_out_asm(_rec_outl, "stwbrx")
 				_memcpy_fromio(dst,PCI_FIX_ADDR(src),n)
 #endif /* !CONFIG_EEH */
 
-#ifdef CONFIG_PPC_INDIRECT_IO
-#define DEF_PCI_HOOK(x)		x
+#ifdef CONFIG_PPC_INDIRECT_PIO
+#define DEF_PCI_HOOK_pio(x)	x
+#else
+#define DEF_PCI_HOOK_pio(x)	NULL
+#endif
+
+#ifdef CONFIG_PPC_INDIRECT_MMIO
+#define DEF_PCI_HOOK_mem(x)	x
 #else
-#define DEF_PCI_HOOK(x)		NULL
+#define DEF_PCI_HOOK_mem(x)	NULL
 #endif
 
 /* Structure containing all the hooks */
@@ -504,7 +510,7 @@ extern struct ppc_pci_io {
 #define DEF_PCI_AC_RET(name, ret, at, al, space, aa)		\
 static inline ret name at					\
 {								\
-	if (DEF_PCI_HOOK(ppc_pci_io.name) != NULL)		\
+	if (DEF_PCI_HOOK_##space(ppc_pci_io.name) != NULL)	\
 		return ppc_pci_io.name al;			\
 	return __do_##name al;					\
 }
@@ -512,7 +518,7 @@ static inline ret name at					\
 #define DEF_PCI_AC_NORET(name, at, al, space, aa)		\
 static inline void name at					\
 {								\
-	if (DEF_PCI_HOOK(ppc_pci_io.name) != NULL)		\
+	if (DEF_PCI_HOOK_##space(ppc_pci_io.name) != NULL)		\
 		ppc_pci_io.name al;				\
 	else							\
 		__do_##name al;					\
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 59eeb77..220b137 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -152,13 +152,18 @@ config PPC_P7_NAP
 	default n
 
 config PPC_INDIRECT_IO
-	bool
+	def_bool y
 	select GENERIC_IOMAP
-	default n
+	depends on PPC_INDIRECT_PIO || PPC_INDIRECT_MMIO
+
+config PPC_INDIRECT_PIO
+	def_bool n
+
+config PPC_INDIRECT_MEM
+	def_bool n
 
 config GENERIC_IOMAP
-	bool
-	default n
+	def_bool n
 
 source "drivers/cpufreq/Kconfig"
 
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index 81239eb..3c7f1de 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -6,7 +6,8 @@ config PPC_CELL_COMMON
 	bool
 	select PPC_CELL
 	select PPC_DCR_MMIO
-	select PPC_INDIRECT_IO
+	select PPC_INDIRECT_PIO
+	select PPC_INDIRECT_MMIO
 	select PPC_NATIVE
 	select PPC_RTAS
 	select IRQ_EDGE_EOI_HANDLER
diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig
index e5bc9f7..ea1d362 100644
--- a/arch/powerpc/platforms/iseries/Kconfig
+++ b/arch/powerpc/platforms/iseries/Kconfig
@@ -1,7 +1,8 @@
 config PPC_ISERIES
 	bool "IBM Legacy iSeries"
 	depends on PPC64 && PPC_BOOK3S
-	select PPC_INDIRECT_IO
+	select PPC_INDIRECT_PIO
+	select PPC_INDIRECT_MMIO
 	select PPC_PCI_CHOICE if EXPERT
 
 menu "iSeries device drivers"
-- 
1.7.1

^ permalink raw reply related

* Re: [PATCH] fix build warnings on defconfigs
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-11  2:45 UTC (permalink / raw)
  To: wanlong.gao
  Cc: linux-mips, david.woodhouse, tony, nicolas.ferre, paulus, eric,
	sam, sfr, linux, khilman, manuel.lauss, u.kleine-koenig, mingo,
	rientjes, anton, ben-linux, linux-arm-kernel, linux-kernel, ralf,
	santosh.shilimkar, akpm, linuxppc-dev, hans-christian.egtvedt
In-Reply-To: <1302375858-11253-1-git-send-email-wanlong.gao@gmail.com>

On 03:04 Sun 10 Apr     , wanlong.gao@gmail.com wrote:
> From: Wanlong Gao <wanlong.gao@gmail.com>
> 
> Change the BT_L2CAP and BT_SCO defconfigs from 'm' to 'y',
> since BT_L2CAP and BT_SCO had changed to bool configs.
> 
> Signed-off-by: Wanlong Gao <wanlong.gao@gmail.com>
> ---
for at91
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Best Regards,
J.

^ permalink raw reply

* Re: [PATCH] net: Remove invalid offloads
From: David Miller @ 2011-04-11  1:55 UTC (permalink / raw)
  To: mirq-linux; +Cc: netdev, linuxppc-dev, vbordug
In-Reply-To: <20110408123846.D947E13909@rere.qmqm.pl>

From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date: Fri,  8 Apr 2011 14:38:46 +0200 (CEST)

> Remove offload changing ethtool ops which drivers don't really support:
> 
>  - fs_enet
>  - ucc_geth
> 
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

Applied.

^ permalink raw reply

* Re: [PATCH] fix build warnings on defconfigs
From: wanlong gao @ 2011-04-10 23:34 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-mips, david.woodhouse, tony, nicolas.ferre, paulus, eric,
	sam, sfr, linux, khilman, manuel.lauss, rientjes, mingo, anton,
	ben-linux, linux-arm-kernel, linux-kernel, ralf,
	santosh.shilimkar, akpm, linuxppc-dev, hans-christian.egtvedt
In-Reply-To: <20110410181238.GE18601@pengutronix.de>

On 4/11/11, Uwe Kleine-K=F6nig <u.kleine-koenig@pengutronix.de> wrote:
> On Sun, Apr 10, 2011 at 03:04:18AM +0800, wanlong.gao@gmail.com wrote:
>> From: Wanlong Gao <wanlong.gao@gmail.com>
>>
>> Change the BT_L2CAP and BT_SCO defconfigs from 'm' to 'y',
>> since BT_L2CAP and BT_SCO had changed to bool configs.
> Pointing out the commit that changed these two in the commit log would
> be nice. Something like:
>
> 	The BT_L2CAP and BT_SCO configs are bool since
>
> 		6427451 (Bluetooth: Merge L2CAP and SCO modules into bluetooth.ko)
>
> 	. So change all defconfigs from =3Dm to =3Dy.
>
> Other than that
> Acked-by: Uwe Kleine-K=F6nig <u.kleine-koenig@pengutronix.de>
Thanks .
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K.                           | Uwe Kleine-K=F6nig          =
  |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  =
|
>

^ permalink raw reply

* Re: [PATCH 2/3] powerpc: Use MSR_64BIT in places
From: Benjamin Herrenschmidt @ 2011-04-10 22:00 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <94DD022B-86D8-4751-BB65-7D46AC63ED9A@kernel.crashing.org>

On Sun, 2011-04-10 at 12:29 -0500, Kumar Gala wrote:
> On Apr 9, 2011, at 5:04 PM, Benjamin Herrenschmidt wrote:
> 
> > On Fri, 2011-04-08 at 04:24 -0500, Kumar Gala wrote:
> >> On Apr 8, 2011, at 2:56 AM, Michael Ellerman wrote:
> >> 
> >>> Use the new MSR_64BIT in a few places. Some of these are already ifdef'ed
> >>> for BOOKE vs BOOKS, but it's still clearer, MSR_SF does not immediately
> >>> parse as "MSR bit for 64bit".
> >>> 
> >>> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> >>> ---
> >>> arch/powerpc/kernel/head_64.S   |    2 +-
> >>> arch/powerpc/kernel/signal_64.c |    4 ++--
> >>> arch/powerpc/kernel/traps.c     |    2 +-
> >>> arch/powerpc/xmon/xmon.c        |   14 +++++++-------
> >>> 4 files changed, 11 insertions(+), 11 deletions(-)
> >> 
> >> However MSR_ISF does ;)
> > 
> > I'm not sure I parse that one :-) Any ways ISF is "interrupt SF" and has
> > no equivalent in the MSR for BookE (it's elsewhere, EPCR no ?).
> 
> I was just saying that if _SF doesn't parse as 64-bit mode, ISF doesn't parse as interrupt into 64-bit mode :)

Ah right :-) But it's not used nearly as much and has no equivalent on
BookE so I wouldn't bother. The deal here is really more about getting
a single definition for both subarchs.

Cheers,
Ben.

^ permalink raw reply

* Re: [PATCH] fix build warnings on defconfigs
From: Uwe Kleine-König @ 2011-04-10 18:12 UTC (permalink / raw)
  To: wanlong.gao
  Cc: linux-mips, david.woodhouse, tony, nicolas.ferre, paulus, eric,
	sam, sfr, linux, khilman, manuel.lauss, rientjes, mingo, anton,
	ben-linux, linux-arm-kernel, linux-kernel, ralf,
	santosh.shilimkar, akpm, linuxppc-dev, hans-christian.egtvedt
In-Reply-To: <1302375858-11253-1-git-send-email-wanlong.gao@gmail.com>

On Sun, Apr 10, 2011 at 03:04:18AM +0800, wanlong.gao@gmail.com wrote:
> From: Wanlong Gao <wanlong.gao@gmail.com>
> 
> Change the BT_L2CAP and BT_SCO defconfigs from 'm' to 'y',
> since BT_L2CAP and BT_SCO had changed to bool configs.
Pointing out the commit that changed these two in the commit log would
be nice. Something like:

	The BT_L2CAP and BT_SCO configs are bool since

		6427451 (Bluetooth: Merge L2CAP and SCO modules into bluetooth.ko)

	. So change all defconfigs from =m to =y.

Other than that
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply

* Re: [PATCH 2/3] powerpc: Use MSR_64BIT in places
From: Kumar Gala @ 2011-04-10 17:29 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <1302386681.28876.0.camel@pasglop>


On Apr 9, 2011, at 5:04 PM, Benjamin Herrenschmidt wrote:

> On Fri, 2011-04-08 at 04:24 -0500, Kumar Gala wrote:
>> On Apr 8, 2011, at 2:56 AM, Michael Ellerman wrote:
>>=20
>>> Use the new MSR_64BIT in a few places. Some of these are already =
ifdef'ed
>>> for BOOKE vs BOOKS, but it's still clearer, MSR_SF does not =
immediately
>>> parse as "MSR bit for 64bit".
>>>=20
>>> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
>>> ---
>>> arch/powerpc/kernel/head_64.S   |    2 +-
>>> arch/powerpc/kernel/signal_64.c |    4 ++--
>>> arch/powerpc/kernel/traps.c     |    2 +-
>>> arch/powerpc/xmon/xmon.c        |   14 +++++++-------
>>> 4 files changed, 11 insertions(+), 11 deletions(-)
>>=20
>> However MSR_ISF does ;)
>=20
> I'm not sure I parse that one :-) Any ways ISF is "interrupt SF" and =
has
> no equivalent in the MSR for BookE (it's elsewhere, EPCR no ?).

I was just saying that if _SF doesn't parse as 64-bit mode, ISF doesn't =
parse as interrupt into 64-bit mode :)

- k=

^ permalink raw reply

* Re: [PATCH] powerpc: ps3 - Update debug message for irq_set_chip_data()
From: Geoff Levand @ 2011-04-10 16:26 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Thomas Gleixner, Linux/PPC Development, Linux Kernel Development
In-Reply-To: <alpine.DEB.2.00.1104101058010.13483@ayla.of.borg>

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

On 04/10/2011 01:59 AM, Geert Uytterhoeven wrote:
> commit ec775d0e70eb6b7116406b3441cb8501c2849dd2 ("powerpc: Convert to new irq_*
> function names") changed a call from set_irq_chip_data() to
> irq_set_chip_data(), but forgot to update the corresponding debug message

Thanks for the attention to detail!

Acked-by: Geoff Levand <geoff@infradead.org>

[-- Attachment #2: 0x2E141B16.asc --]
[-- Type: application/pgp-keys, Size: 9418 bytes --]

^ permalink raw reply

* [PATCH RESENT] net: ps3_gelic: convert to hw_features
From: Michał Mirosław @ 2011-04-10 14:49 UTC (permalink / raw)
  To: netdev; +Cc: Geoff Levand, cbe-oss-dev, linuxppc-dev
In-Reply-To: <20110410144746.A28B11389B@rere.qmqm.pl>

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
[untested]
[resent because of broken headers]

 drivers/net/ps3_gelic_net.c      |   26 +++++---------------------
 drivers/net/ps3_gelic_net.h      |    3 ---
 drivers/net/ps3_gelic_wireless.c |    4 ----
 3 files changed, 5 insertions(+), 28 deletions(-)

diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index 5ecfa4b..6c83ac6 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -951,7 +951,7 @@ static void gelic_net_pass_skb_up(struct gelic_descr *descr,
 	skb->protocol = eth_type_trans(skb, netdev);
 
 	/* checksum offload */
-	if (card->rx_csum) {
+	if (netdev->features & NETIF_F_RXCSUM) {
 		if ((data_status & GELIC_DESCR_DATA_STATUS_CHK_MASK) &&
 		    (!(data_error & GELIC_DESCR_DATA_ERROR_CHK_MASK)))
 			skb->ip_summed = CHECKSUM_UNNECESSARY;
@@ -1312,21 +1312,6 @@ static int gelic_ether_set_settings(struct net_device *netdev,
 	return 0;
 }
 
-u32 gelic_net_get_rx_csum(struct net_device *netdev)
-{
-	struct gelic_card *card = netdev_card(netdev);
-
-	return card->rx_csum;
-}
-
-int gelic_net_set_rx_csum(struct net_device *netdev, u32 data)
-{
-	struct gelic_card *card = netdev_card(netdev);
-
-	card->rx_csum = data;
-	return 0;
-}
-
 static void gelic_net_get_wol(struct net_device *netdev,
 			      struct ethtool_wolinfo *wol)
 {
@@ -1411,10 +1396,6 @@ static const struct ethtool_ops gelic_ether_ethtool_ops = {
 	.get_settings	= gelic_ether_get_settings,
 	.set_settings	= gelic_ether_set_settings,
 	.get_link	= ethtool_op_get_link,
-	.get_tx_csum	= ethtool_op_get_tx_csum,
-	.set_tx_csum	= ethtool_op_set_tx_csum,
-	.get_rx_csum	= gelic_net_get_rx_csum,
-	.set_rx_csum	= gelic_net_set_rx_csum,
 	.get_wol	= gelic_net_get_wol,
 	.set_wol	= gelic_net_set_wol,
 };
@@ -1512,7 +1493,11 @@ int __devinit gelic_net_setup_netdev(struct net_device *netdev,
 	int status;
 	u64 v1, v2;
 
+	netdev->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
+
 	netdev->features = NETIF_F_IP_CSUM;
+	if (GELIC_CARD_RX_CSUM_DEFAULT)
+		netdev->features |= NETIF_F_RXCSUM;
 
 	status = lv1_net_control(bus_id(card), dev_id(card),
 				 GELIC_LV1_GET_MAC_ADDRESS,
@@ -1756,7 +1741,6 @@ static int __devinit ps3_gelic_driver_probe(struct ps3_system_bus_device *dev)
 	/* setup card structure */
 	card->irq_mask = GELIC_CARD_RXINT | GELIC_CARD_TXINT |
 		GELIC_CARD_PORT_STATUS_CHANGED;
-	card->rx_csum = GELIC_CARD_RX_CSUM_DEFAULT;
 
 
 	if (gelic_card_init_chain(card, &card->tx_chain,
diff --git a/drivers/net/ps3_gelic_net.h b/drivers/net/ps3_gelic_net.h
index 32521ae..50d8958 100644
--- a/drivers/net/ps3_gelic_net.h
+++ b/drivers/net/ps3_gelic_net.h
@@ -290,7 +290,6 @@ struct gelic_card {
 	struct gelic_descr_chain tx_chain;
 	struct gelic_descr_chain rx_chain;
 	int rx_dma_restart_required;
-	int rx_csum;
 	/*
 	 * tx_lock guards tx descriptor list and
 	 * tx_dma_progress.
@@ -377,8 +376,6 @@ extern int gelic_net_setup_netdev(struct net_device *netdev,
 /* shared ethtool ops */
 extern void gelic_net_get_drvinfo(struct net_device *netdev,
 				  struct ethtool_drvinfo *info);
-extern u32 gelic_net_get_rx_csum(struct net_device *netdev);
-extern int gelic_net_set_rx_csum(struct net_device *netdev, u32 data);
 extern void gelic_net_poll_controller(struct net_device *netdev);
 
 #endif /* _GELIC_NET_H */
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c
index 4a624a2..39a93e8 100644
--- a/drivers/net/ps3_gelic_wireless.c
+++ b/drivers/net/ps3_gelic_wireless.c
@@ -2581,10 +2581,6 @@ static const struct net_device_ops gelic_wl_netdevice_ops = {
 static const struct ethtool_ops gelic_wl_ethtool_ops = {
 	.get_drvinfo	= gelic_net_get_drvinfo,
 	.get_link	= gelic_wl_get_link,
-	.get_tx_csum	= ethtool_op_get_tx_csum,
-	.set_tx_csum	= ethtool_op_set_tx_csum,
-	.get_rx_csum	= gelic_net_get_rx_csum,
-	.set_rx_csum	= gelic_net_set_rx_csum,
 };
 
 static void __devinit gelic_wl_setup_netdev_ops(struct net_device *netdev)
-- 
1.7.2.5

^ 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