LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] powerpc/srio: Fix the compile errors when building with 64bit
From: Liu Gang @ 2012-03-07 12:55 UTC (permalink / raw)
  To: linuxppc-dev, Alexandre.Bounine
  Cc: r58472, linux-kernel, r61911, paul.gortmaker, Liu Gang, akpm,
	Shaohui Xie

For the file "arch/powerpc/sysdev/fsl_rmu.c", there will be some compile
errors while using the corenet64_smp_defconfig:

.../fsl_rmu.c:315: error: cast from pointer to integer of different size
.../fsl_rmu.c:320: error: cast to pointer from integer of different size
.../fsl_rmu.c:320: error: cast to pointer from integer of different size
.../fsl_rmu.c:320: error: cast to pointer from integer of different size
.../fsl_rmu.c:330: error: cast to pointer from integer of different size
.../fsl_rmu.c:332: error: cast to pointer from integer of different size
.../fsl_rmu.c:339: error: cast to pointer from integer of different size
.../fsl_rmu.c:340: error: cast to pointer from integer of different size
.../fsl_rmu.c:341: error: cast to pointer from integer of different size
.../fsl_rmu.c:348: error: cast to pointer from integer of different size
.../fsl_rmu.c:348: error: cast to pointer from integer of different size
.../fsl_rmu.c:348: error: cast to pointer from integer of different size
.../fsl_rmu.c:659: error: cast from pointer to integer of different size
.../fsl_rmu.c:659: error: format '%8.8x' expects type 'unsigned int',
                   but argument 5 has type 'size_t'
.../fsl_rmu.c:985: error: cast from pointer to integer of different size
.../fsl_rmu.c:997: error: cast to pointer from integer of different size

Rewrote the corresponding code with the support of 64bit building.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
Changes in v2:
 - Add the struct "rio_dbell_msg" to instead of some DBELL_* macros.
 - Change the "virt_buf" to be "void *" type.
 - Change "Signed-off-by" to "Reported-by" for Paul.

 arch/powerpc/sysdev/fsl_rmu.c |   43 +++++++++++++++++++++-------------------
 1 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_rmu.c b/arch/powerpc/sysdev/fsl_rmu.c
index 1548578..1bba6d1 100644
--- a/arch/powerpc/sysdev/fsl_rmu.c
+++ b/arch/powerpc/sysdev/fsl_rmu.c
@@ -100,14 +100,8 @@
 #define DOORBELL_DSR_TE		0x00000080
 #define DOORBELL_DSR_QFI	0x00000010
 #define DOORBELL_DSR_DIQI	0x00000001
-#define DOORBELL_TID_OFFSET	0x02
-#define DOORBELL_SID_OFFSET	0x04
-#define DOORBELL_INFO_OFFSET	0x06
 
 #define DOORBELL_MESSAGE_SIZE	0x08
-#define DBELL_SID(x)		(*(u16 *)(x + DOORBELL_SID_OFFSET))
-#define DBELL_TID(x)		(*(u16 *)(x + DOORBELL_TID_OFFSET))
-#define DBELL_INF(x)		(*(u16 *)(x + DOORBELL_INFO_OFFSET))
 
 struct rio_msg_regs {
 	u32 omr;
@@ -193,6 +187,13 @@ struct fsl_rmu {
 	int rxirq;
 };
 
+struct rio_dbell_msg {
+	u16 pad1;
+	u16 tid;
+	u16 sid;
+	u16 info;
+};
+
 /**
  * fsl_rio_tx_handler - MPC85xx outbound message interrupt handler
  * @irq: Linux interrupt number
@@ -311,8 +312,8 @@ fsl_rio_dbell_handler(int irq, void *dev_instance)
 
 	/* XXX Need to check/dispatch until queue empty */
 	if (dsr & DOORBELL_DSR_DIQI) {
-		u32 dmsg =
-			(u32) fsl_dbell->dbell_ring.virt +
+		struct rio_dbell_msg *dmsg =
+			fsl_dbell->dbell_ring.virt +
 			(in_be32(&fsl_dbell->dbell_regs->dqdpar) & 0xfff);
 		struct rio_dbell *dbell;
 		int found = 0;
@@ -320,25 +321,25 @@ fsl_rio_dbell_handler(int irq, void *dev_instance)
 		pr_debug
 			("RIO: processing doorbell,"
 			" sid %2.2x tid %2.2x info %4.4x\n",
-			DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
+			dmsg->sid, dmsg->tid, dmsg->info);
 
 		for (i = 0; i < MAX_PORT_NUM; i++) {
 			if (fsl_dbell->mport[i]) {
 				list_for_each_entry(dbell,
 					&fsl_dbell->mport[i]->dbells, node) {
 					if ((dbell->res->start
-						<= DBELL_INF(dmsg))
+						<= dmsg->info)
 						&& (dbell->res->end
-						>= DBELL_INF(dmsg))) {
+						>= dmsg->info)) {
 						found = 1;
 						break;
 					}
 				}
 				if (found && dbell->dinb) {
 					dbell->dinb(fsl_dbell->mport[i],
-						dbell->dev_id, DBELL_SID(dmsg),
-						DBELL_TID(dmsg),
-						DBELL_INF(dmsg));
+						dbell->dev_id, dmsg->sid,
+						dmsg->tid,
+						dmsg->info);
 					break;
 				}
 			}
@@ -348,8 +349,8 @@ fsl_rio_dbell_handler(int irq, void *dev_instance)
 			pr_debug
 				("RIO: spurious doorbell,"
 				" sid %2.2x tid %2.2x info %4.4x\n",
-				DBELL_SID(dmsg), DBELL_TID(dmsg),
-				DBELL_INF(dmsg));
+				dmsg->sid, dmsg->tid,
+				dmsg->info);
 		}
 		setbits32(&fsl_dbell->dbell_regs->dmr, DOORBELL_DMR_DI);
 		out_be32(&fsl_dbell->dbell_regs->dsr, DOORBELL_DSR_DIQI);
@@ -657,7 +658,8 @@ fsl_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox,
 	int ret = 0;
 
 	pr_debug("RIO: fsl_add_outb_message(): destid %4.4x mbox %d buffer " \
-		 "%8.8x len %8.8x\n", rdev->destid, mbox, (int)buffer, len);
+		 "%8.8lx len %8.8zx\n", rdev->destid, mbox,
+		(unsigned long)buffer, len);
 	if ((len < 8) || (len > RIO_MAX_MSG_SIZE)) {
 		ret = -EINVAL;
 		goto out;
@@ -972,7 +974,8 @@ out:
 void *fsl_get_inb_message(struct rio_mport *mport, int mbox)
 {
 	struct fsl_rmu *rmu = GET_RMM_HANDLE(mport);
-	u32 phys_buf, virt_buf;
+	u32 phys_buf;
+	void *virt_buf;
 	void *buf = NULL;
 	int buf_idx;
 
@@ -982,7 +985,7 @@ void *fsl_get_inb_message(struct rio_mport *mport, int mbox)
 	if (phys_buf == in_be32(&rmu->msg_regs->ifqepar))
 		goto out2;
 
-	virt_buf = (u32) rmu->msg_rx_ring.virt + (phys_buf
+	virt_buf = rmu->msg_rx_ring.virt + (phys_buf
 						- rmu->msg_rx_ring.phys);
 	buf_idx = (phys_buf - rmu->msg_rx_ring.phys) / RIO_MAX_MSG_SIZE;
 	buf = rmu->msg_rx_ring.virt_buffer[buf_idx];
@@ -994,7 +997,7 @@ void *fsl_get_inb_message(struct rio_mport *mport, int mbox)
 	}
 
 	/* Copy max message size, caller is expected to allocate that big */
-	memcpy(buf, (void *)virt_buf, RIO_MAX_MSG_SIZE);
+	memcpy(buf, virt_buf, RIO_MAX_MSG_SIZE);
 
 	/* Clear the available buffer */
 	rmu->msg_rx_ring.virt_buffer[buf_idx] = NULL;
-- 
1.7.0.4

^ permalink raw reply related

* RE: [PATCH v2] powerpc/srio: Fix the compile errors when building with 64bit
From: David Laight @ 2012-03-07 13:18 UTC (permalink / raw)
  To: Liu Gang, linuxppc-dev, Alexandre.Bounine
  Cc: Shaohui Xie, r61911, linux-kernel, paul.gortmaker, akpm, r58472
In-Reply-To: <1331124924-18838-1-git-send-email-Gang.Liu@freescale.com>

> diff --git a/arch/powerpc/sysdev/fsl_rmu.c
b/arch/powerpc/sysdev/fsl_rmu.c
> index 1548578..1bba6d1 100644
> --- a/arch/powerpc/sysdev/fsl_rmu.c
> +++ b/arch/powerpc/sysdev/fsl_rmu.c

> @@ -657,7 +658,8 @@ fsl_add_outb_message(struct rio_mport=20
> *mport, struct rio_dev *rdev, int mbox,
>  	int ret =3D 0;
> =20
>  	pr_debug("RIO: fsl_add_outb_message(): destid %4.4x mbox %d
buffer " \
> -		 "%8.8x len %8.8x\n", rdev->destid, mbox, (int)buffer,
len);
> +		 "%8.8lx len %8.8zx\n", rdev->destid, mbox,
> +		(unsigned long)buffer, len);

Should 'buffer' be printed with %p ??

	David

^ permalink raw reply

* Re: [PATCH 1/2] powerpc/e500: make load_up_spe a normal fuction
From: Alexander Graf @ 2012-03-07 13:53 UTC (permalink / raw)
  To: Yin Olivia-R63875
  Cc: Wood Scott-B07421, linuxppc-dev@lists.ozlabs.org,
	kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
In-Reply-To: <B5012D5F6E2BBC4DBF16B3E6037A5B7316CCE0@039-SN1MPN1-004.039d.mgd.msft.net>

On 02/28/2012 08:09 AM, Yin Olivia-R63875 wrote:
> Hi Scott,
>
> This had been reviewed before and accepted by internal tree.
> http://linux.freescale.net/patchwork/patch/11100/
> http://git.am.freescale.net/gitolite/gitweb.cgi/sdk/kvm.git/commit/?h=for-sdk1.2&id=c5088844dc665dbdae4fa51b8d58dc203bacc17e
>
> I didn't change anything except the line.
> I just commit to external kvm-ppc mailing list. Should I add my own Signed-off-by?

Yes, if you just take a patch from someone else and direct it to another 
tree, you keep the From: line (git cherry-pick or git am should do that 
automatically for you) and add your own SOB-line (git am -s can do that 
for example).

Since you're also supposed to change the description, please note that 
between Yu's SOB line and your SOB line with something like

Signed-off-by: Liu Yu<yu.liu@freescale.com>
[olivia: change description]
Signed-off-by: Olivia Yin<r63875@freescale.com>



Alex

^ permalink raw reply

* Re: [PATCH v2 1/2] powerpc/e500: make load_up_spe a normal fuction
From: Alexander Graf @ 2012-03-07 13:56 UTC (permalink / raw)
  To: Olivia Yin; +Cc: Liu Yu, kvm, B04825, kvm-ppc, Scott Wood, linuxppc-dev
In-Reply-To: <1330564819-11139-1-git-send-email-hong-hua.yin@freescale.com>

On 03/01/2012 02:20 AM, Olivia Yin wrote:
> From: Liu Yu<yu.liu@freescale.com>
>
> So that we can call it when improving SPE switch like book3e did for fp switch.

Timur / Scott, can you please (n)ack this one?

Alex

> Signed-off-by: Liu Yu<yu.liu@freescale.com>
> Signed-off-by: Olivia Yin<hong-hua.yin@freescale.com>
> ---
> v2: 	add Signed-off-by
>
>   arch/powerpc/kernel/head_fsl_booke.S |   23 ++++++-----------------
>   1 files changed, 6 insertions(+), 17 deletions(-)
>
> diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
> index d5d78c4..c96e025 100644
> --- a/arch/powerpc/kernel/head_fsl_booke.S
> +++ b/arch/powerpc/kernel/head_fsl_booke.S
> @@ -539,8 +539,10 @@ interrupt_base:
>   	/* SPE Unavailable */
>   	START_EXCEPTION(SPEUnavailable)
>   	NORMAL_EXCEPTION_PROLOG
> -	bne	load_up_spe
> -	addi	r3,r1,STACK_FRAME_OVERHEAD
> +	beq	1f
> +	bl	load_up_spe
> +	b	fast_exception_return
> +1:	addi	r3,r1,STACK_FRAME_OVERHEAD
>   	EXC_XFER_EE_LITE(0x2010, KernelSPE)
>   #else
>   	EXCEPTION(0x2020, SPEUnavailable, unknown_exception, EXC_XFER_EE)
> @@ -743,7 +745,7 @@ tlb_write_entry:
>   /* Note that the SPE support is closely modeled after the AltiVec
>    * support.  Changes to one are likely to be applicable to the
>    * other!  */
> -load_up_spe:
> +_GLOBAL(load_up_spe)
>   /*
>    * Disable SPE for the task which had SPE previously,
>    * and save its SPE registers in its thread_struct.
> @@ -791,20 +793,7 @@ load_up_spe:
>   	subi	r4,r5,THREAD
>   	stw	r4,last_task_used_spe@l(r3)
>   #endif /* !CONFIG_SMP */
> -	/* restore registers and return */
> -2:	REST_4GPRS(3, r11)
> -	lwz	r10,_CCR(r11)
> -	REST_GPR(1, r11)
> -	mtcr	r10
> -	lwz	r10,_LINK(r11)
> -	mtlr	r10
> -	REST_GPR(10, r11)
> -	mtspr	SPRN_SRR1,r9
> -	mtspr	SPRN_SRR0,r12
> -	REST_GPR(9, r11)
> -	REST_GPR(12, r11)
> -	lwz	r11,GPR11(r11)
> -	rfi
> +	blr
>
>   /*
>    * SPE unavailable trap from kernel - print a message, but let

^ permalink raw reply

* Re: [PATCH v2 0/9] DMA engine cookie handling cleanups
From: Vinod Koul @ 2012-03-07 13:54 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Stephen Warren, Linus Walleij, Srinidhi Kasagar, Barry Song,
	Dan Williams, linuxppc-dev, linux-arm-kernel
In-Reply-To: <20120306223321.GD15201@n2100.arm.linux.org.uk>

On Tue, 2012-03-06 at 22:33 +0000, Russell King - ARM Linux wrote:
> [v2 - more or less same description.  Including lakml in cc for the full
> set]
> 
> This patch series cleans up the handling of cookies in DMA engine drivers.
> This is done by providing a set of inline library functions for common
> tasks:
> 
> - moving the 'last completed cookie' into struct dma_chan - everyone
>   has this in their driver private channel data structure
> 
> - consolidate allocation of cookies to DMA descriptors
> 
> - common way to update 'last completed cookie' value
> 
> - standard way to implement tx_status callback and update the residue
> 
> - consolidate initialization of cookies
> 
> - update implementations differing from the majority of DMA engine drivers
>   to behave the same as the majority implementation in respect of cookies
> 
> What this means is that we get to the point where all DMA engine drivers
> will hand out cookie value '2' as the first, and incrementing cookie
> values up to INT_MAX, returning to cookie '1' as the next cookie.
> 
> Think of this patch series as round 1...  I am hoping over time that more
> code can be consolidated between the DMA engine drivers and end up with a
> consistent way to handle various common themes in DMA engine hardware
> (like physical channel<->peripheral request signal selection.)
Thanks Russell,

I have tested this on atom today, and as expected works flawlessly :)
After all acks, I can merge or these can go thru your tree with my Ack.
Either way is okay.

I applied the v2 on a branch and also rebased on top of slave-dma.next.
There were few conflicts in imx-dma.c. Sacha, Javier, pls see that merge
is right.

This branch (rmk_cookie_fixes2_rebased) is not yet pushed, as I am not
able to connect to infradead.org, should be done when server is back.



-- 
~Vinod

^ permalink raw reply

* Re: [PATCH v2] powerpc/dts: fix the compatible string of sec 4.0
From: Haiying Wang @ 2012-03-07 14:45 UTC (permalink / raw)
  To: Shengzhou Liu; +Cc: linuxppc-dev, stable, Liu Shuo
In-Reply-To: <1331097606-22407-1-git-send-email-Shengzhou.Liu@freescale.com>

On Wed, 2012-03-07 at 13:20 +0800, Shengzhou Liu wrote:
> From: Liu Shuo <shuo.liu@freescale.com>
> 
> Fix the compatible string of sec 4.0 to match with CAMM driver according
%s/CAMM/CAAM.

Haiying


> to Documentation/devicetree/bindings/crypto/fsl-sec4.txt
> 
> Signed-off-by: Liu Shuo <shuo.liu@freescale.com>
> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
> ---
> v2: refine description.
> 
>  arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi
> index bf957a7..d4c9d5d 100644
> --- a/arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi
> @@ -33,32 +33,32 @@
>   */
>  
>  crypto@30000 {
> -	compatible = "fsl,sec4.4", "fsl,sec4.0";
> +	compatible = "fsl,sec-v4.4", "fsl,sec-v4.0";
>  	#address-cells = <1>;
>  	#size-cells = <1>;
>  	reg		 = <0x30000 0x10000>;
>  	interrupts	 = <58 2 0 0>;
>  
>  	sec_jr0: jr@1000 {
> -		compatible = "fsl,sec4.4-job-ring", "fsl,sec4.0-job-ring";
> +		compatible = "fsl,sec-v4.4-job-ring", "fsl,sec-v4.0-job-ring";
>  		reg	   = <0x1000 0x1000>;
>  		interrupts	 = <45 2 0 0>;
>  	};
>  
>  	sec_jr1: jr@2000 {
> -		compatible = "fsl,sec4.4-job-ring", "fsl,sec4.0-job-ring";
> +		compatible = "fsl,sec-v4.4-job-ring", "fsl,sec-v4.0-job-ring";
>  		reg	   = <0x2000 0x1000>;
>  		interrupts	 = <45 2 0 0>;
>  	};
>  
>  	sec_jr2: jr@3000 {
> -		compatible = "fsl,sec4.4-job-ring", "fsl,sec4.0-job-ring";
> +		compatible = "fsl,sec-v4.4-job-ring", "fsl,sec-v4.0-job-ring";
>  		reg	   = <0x3000 0x1000>;
>  		interrupts	 = <45 2 0 0>;
>  	};
>  
>  	sec_jr3: jr@4000 {
> -		compatible = "fsl,sec4.4-job-ring", "fsl,sec4.0-job-ring";
> +		compatible = "fsl,sec-v4.4-job-ring", "fsl,sec-v4.0-job-ring";
>  		reg	   = <0x4000 0x1000>;
>  		interrupts	 = <45 2 0 0>;
>  	};

^ permalink raw reply

* Re: [PATCH 6/9] powerpc/mpc8548cds: Add FPGA node to dts
From: Tabi Timur-B04825 @ 2012-03-07 16:22 UTC (permalink / raw)
  To: Zhao Chenhui-B35336; +Cc: linuxppc-dev@lists.ozlabs.org
In-Reply-To: <1331024805-15926-5-git-send-email-chenhui.zhao@freescale.com>

On Tue, Mar 6, 2012 at 3:06 AM, Zhao Chenhui <chenhui.zhao@freescale.com> w=
rote:
> From: chenhui zhao <chenhui.zhao@freescale.com>
>
> Remove FPGA(CADMUS) macros in code. Move it to dts.
>
> Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---

Acked-by: Timur Tabi <timur@freescale.com>


--=20
Timur Tabi
Linux kernel developer at Freescale=

^ permalink raw reply

* Re: [PATCH 6/9] powerpc/mpc8548cds: Add FPGA node to dts
From: Timur Tabi @ 2012-03-07 16:24 UTC (permalink / raw)
  To: Zhao Chenhui; +Cc: linuxppc-dev
In-Reply-To: <1331024805-15926-5-git-send-email-chenhui.zhao@freescale.com>

On Tue, Mar 6, 2012 at 3:06 AM, Zhao Chenhui <chenhui.zhao@freescale.com>
wrote:
> From: chenhui zhao <chenhui.zhao@freescale.com>
>
> Remove FPGA(CADMUS) macros in code. Move it to dts.
>
> Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---

Acked-by: Timur Tabi <timur@freescale.com>


-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* Re: [PATCH v2 1/2] powerpc/e500: make load_up_spe a normal fuction
From: Scott Wood @ 2012-03-07 17:08 UTC (permalink / raw)
  To: Alexander Graf; +Cc: kvm, Olivia Yin, B04825, kvm-ppc, linuxppc-dev
In-Reply-To: <4F57691E.1070105@suse.de>

On 03/07/2012 07:56 AM, Alexander Graf wrote:
> On 03/01/2012 02:20 AM, Olivia Yin wrote:
>> From: Liu Yu<yu.liu@freescale.com>
>>
>> So that we can call it when improving SPE switch like book3e did for
>> fp switch.
> 
> Timur / Scott, can you please (n)ack this one?

ACK, though as it touches non-KVM code it'd be nice to get an ack from
Kumar.

-Scott

> 
> Alex
> 
>> Signed-off-by: Liu Yu<yu.liu@freescale.com>
>> Signed-off-by: Olivia Yin<hong-hua.yin@freescale.com>
>> ---
>> v2:     add Signed-off-by
>>
>>   arch/powerpc/kernel/head_fsl_booke.S |   23 ++++++-----------------
>>   1 files changed, 6 insertions(+), 17 deletions(-)
>>
>> diff --git a/arch/powerpc/kernel/head_fsl_booke.S
>> b/arch/powerpc/kernel/head_fsl_booke.S
>> index d5d78c4..c96e025 100644
>> --- a/arch/powerpc/kernel/head_fsl_booke.S
>> +++ b/arch/powerpc/kernel/head_fsl_booke.S
>> @@ -539,8 +539,10 @@ interrupt_base:
>>       /* SPE Unavailable */
>>       START_EXCEPTION(SPEUnavailable)
>>       NORMAL_EXCEPTION_PROLOG
>> -    bne    load_up_spe
>> -    addi    r3,r1,STACK_FRAME_OVERHEAD
>> +    beq    1f
>> +    bl    load_up_spe
>> +    b    fast_exception_return
>> +1:    addi    r3,r1,STACK_FRAME_OVERHEAD
>>       EXC_XFER_EE_LITE(0x2010, KernelSPE)
>>   #else
>>       EXCEPTION(0x2020, SPEUnavailable, unknown_exception, EXC_XFER_EE)
>> @@ -743,7 +745,7 @@ tlb_write_entry:
>>   /* Note that the SPE support is closely modeled after the AltiVec
>>    * support.  Changes to one are likely to be applicable to the
>>    * other!  */
>> -load_up_spe:
>> +_GLOBAL(load_up_spe)
>>   /*
>>    * Disable SPE for the task which had SPE previously,
>>    * and save its SPE registers in its thread_struct.
>> @@ -791,20 +793,7 @@ load_up_spe:
>>       subi    r4,r5,THREAD
>>       stw    r4,last_task_used_spe@l(r3)
>>   #endif /* !CONFIG_SMP */
>> -    /* restore registers and return */
>> -2:    REST_4GPRS(3, r11)
>> -    lwz    r10,_CCR(r11)
>> -    REST_GPR(1, r11)
>> -    mtcr    r10
>> -    lwz    r10,_LINK(r11)
>> -    mtlr    r10
>> -    REST_GPR(10, r11)
>> -    mtspr    SPRN_SRR1,r9
>> -    mtspr    SPRN_SRR0,r12
>> -    REST_GPR(9, r11)
>> -    REST_GPR(12, r11)
>> -    lwz    r11,GPR11(r11)
>> -    rfi
>> +    blr
>>
>>   /*
>>    * SPE unavailable trap from kernel - print a message, but let
> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply

* Re: [PATCH v2 0/9] DMA engine cookie handling cleanups
From: Jassi Brar @ 2012-03-07 18:09 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Stephen Warren, Linus Walleij, Srinidhi Kasagar, Vinod Koul,
	Barry Song, Dan Williams, linuxppc-dev, linux-arm-kernel
In-Reply-To: <20120306223321.GD15201@n2100.arm.linux.org.uk>

On Wed, Mar 7, 2012 at 4:03 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> [v2 - more or less same description. =C2=A0Including lakml in cc for the =
full
> set]
>
> This patch series cleans up the handling of cookies in DMA engine drivers=
.
> This is done by providing a set of inline library functions for common
> tasks:
>
> - moving the 'last completed cookie' into struct dma_chan - everyone
> =C2=A0has this in their driver private channel data structure
>
> - consolidate allocation of cookies to DMA descriptors
>
> - common way to update 'last completed cookie' value
>
> - standard way to implement tx_status callback and update the residue
>
> - consolidate initialization of cookies
>
> - update implementations differing from the majority of DMA engine driver=
s
> =C2=A0to behave the same as the majority implementation in respect of coo=
kies
>
> What this means is that we get to the point where all DMA engine drivers
> will hand out cookie value '2' as the first, and incrementing cookie
> values up to INT_MAX, returning to cookie '1' as the next cookie.
>
> Think of this patch series as round 1... =C2=A0I am hoping over time that=
 more
> code can be consolidated between the DMA engine drivers and end up with a
> consistent way to handle various common themes in DMA engine hardware
> (like physical channel<->peripheral request signal selection.)
>
Compilation is broken without the following minor fix.
After that you may add
       Acked-by: Jassi Brar <jassisinghbrar@gmail.com>

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 49c123f..abf35a3 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -339,7 +339,6 @@ static int pl330_control(struct dma_chan *chan,
enum dma_ctrl_cmd cmd, unsigned
 		/* Mark all desc done */
 		list_for_each_entry_safe(desc, _dt, &pch->work_list , node) {
 			desc->status =3D DONE;
-			pch->completed =3D desc->txd.cookie;
 			list_move_tail(&desc->node, &list);
 		}


Thanks.

^ permalink raw reply related

* Re: [PATCH v2 0/9] DMA engine cookie handling cleanups
From: Russell King - ARM Linux @ 2012-03-07 18:21 UTC (permalink / raw)
  To: Jassi Brar
  Cc: Stephen Warren, Linus Walleij, Srinidhi Kasagar, Vinod Koul,
	Barry Song, Dan Williams, linuxppc-dev, linux-arm-kernel
In-Reply-To: <CABb+yY0A9=XKuw=N1fFXCB507zR3U=wofqATVcO_wtnnVrgXzQ@mail.gmail.com>

On Wed, Mar 07, 2012 at 11:39:25PM +0530, Jassi Brar wrote:
> Compilation is broken without the following minor fix.
> After that you may add
>        Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
> 
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index 49c123f..abf35a3 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -339,7 +339,6 @@ static int pl330_control(struct dma_chan *chan,
> enum dma_ctrl_cmd cmd, unsigned
>  		/* Mark all desc done */
>  		list_for_each_entry_safe(desc, _dt, &pch->work_list , node) {
>  			desc->status = DONE;
> -			pch->completed = desc->txd.cookie;

I'm not sure just removing this is sufficient.  Presumably it's
there for some reason - maybe it needs replacing with a call to
dma_cookie_complete() to preserve existing behaviour?

^ permalink raw reply

* Re: [PATCH v2 0/9] DMA engine cookie handling cleanups
From: Jassi Brar @ 2012-03-07 18:44 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Stephen Warren, Linus Walleij, Srinidhi Kasagar, Vinod Koul,
	Barry Song, Dan Williams, linuxppc-dev, linux-arm-kernel
In-Reply-To: <20120307182155.GD18787@n2100.arm.linux.org.uk>

On Wed, Mar 7, 2012 at 11:51 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Wed, Mar 07, 2012 at 11:39:25PM +0530, Jassi Brar wrote:
>> Compilation is broken without the following minor fix.
>> After that you may add
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Acked-by: Jassi Brar <jassisinghbrar@gmail.co=
m>
>>
>> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
>> index 49c123f..abf35a3 100644
>> --- a/drivers/dma/pl330.c
>> +++ b/drivers/dma/pl330.c
>> @@ -339,7 +339,6 @@ static int pl330_control(struct dma_chan *chan,
>> enum dma_ctrl_cmd cmd, unsigned
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Mark all desc done *=
/
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 list_for_each_entry_saf=
e(desc, _dt, &pch->work_list , node) {
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 desc->status =3D DONE;
>> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
pch->completed =3D desc->txd.cookie;
>
> I'm not sure just removing this is sufficient. =C2=A0Presumably it's
> there for some reason - maybe it needs replacing with a call to
> dma_cookie_complete() to preserve existing behaviour?
>
That was anyway a redundant save in DMA_TERMINATE_ALL, so it should be ok.

^ permalink raw reply

* Re: [PATCH] spufs raises two exceptions
From: Benjamin Herrenschmidt @ 2012-03-07 21:01 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linuxppc-dev, masterzorag, Al Viro
In-Reply-To: <201203071248.54887.arnd@arndb.de>


> > diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
> > index d4a094c..63b4e43 100644
> > --- a/arch/powerpc/platforms/cell/spufs/inode.c
> > +++ b/arch/powerpc/platforms/cell/spufs/inode.c
> > @@ -454,19 +454,16 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
> >  	struct spu_gang *gang;
> >  	struct spu_context *neighbor;
> >  
> > -	ret = -EPERM;
> >  	if ((flags & SPU_CREATE_NOSCHED) &&
> > -	    !capable(CAP_SYS_NICE))
> > -		goto out_unlock;
> > +	    !capable(CAP_SYa_NICE))
> 
>                     ^typo

Odd, probably an emacs fart

> > +		return -EPERM;
> >  
> > -	ret = -EINVAL;
> >  	if ((flags & (SPU_CREATE_NOSCHED | SPU_CREATE_ISOLATE))
> >  	    == SPU_CREATE_ISOLATE)
> > -		goto out_unlock;
> > +		return -EINVAL;
> >  
> > -	ret = -ENODEV;
> >  	if ((flags & SPU_CREATE_ISOLATE) && !isolated_loader)
> > -		goto out_unlock;
> > +		return -ENODEV;
> >  
> >  	gang = NULL;
> >  	neighbor = NULL;
> 
> This mostly changes coding style, pointlessly.

How so ? it's no longer necessary to store ret and goto out since there
is no cleanup at all, which makes things smaller/simpler. I wouldn't
call that 'pointlessly'.

I tend to dislike the use of "goto xxxx" when the xxx: label does no
cleanup whatsoever.

> > @@ -512,10 +509,6 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
> >  out_aff_unlock:
> >  	if (affinity)
> >  		mutex_unlock(&gang->aff_mutex);
> > -out_unlock:
> > -	mutex_unlock(&inode->i_mutex);
> > -out:
> > -	dput(dentry);
> >  	return ret;
> >  }
> 
> The original intention of this was to always unlock in the error case. It
> seems that Al changed this in 1ba10681 "switch do_spufs_create() to
> user_path_create(), fix double-unlock" to never unlock early but always
> unlock in do_spu_create, fixing a different bug, but it looks like
> he forgot this one in the process.
> 
> The reason why we originally had the unlock in the leaf functions is to
> avoid a problem with spu_forget(), which had to be called without
> the i_mutex held to avoid deadlocks.

Ok. I assumed it was fnotify that was the problem...

> > @@ -600,10 +591,6 @@ static int spufs_create_gang(struct inode *inode,
> >  		int err = simple_rmdir(inode, dentry);
> >  		WARN_ON(err);
> >  	}
> > -
> > -out:
> > -	mutex_unlock(&inode->i_mutex);
> > -	dput(dentry);
> >  	return ret;
> >  }
> 
> Right, this obviously goes together with the one above,

Yes, whatever they do they should do the same thing.

> > @@ -613,22 +600,21 @@ static struct file_system_type spufs_type;
> >  long spufs_create(struct path *path, struct dentry *dentry
> >  		unsigned int flags, umode_t mode, struct file *filp)
> >  {
> > -	int ret;
> > +	int ret = -EINVAL;
> >  
> > -	ret = -EINVAL;
> >  	/* check if we are on spufs */
> >  	if (path->dentry->d_sb->s_type != &spufs_type)
> > -		goto out;
> > +		goto fail;
> >  
> >  	/* don't accept undefined flags */
> >  	if (flags & (~SPU_CREATE_FLAG_ALL))
> > -		goto out;
> > +		goto fail;
> >  
> >  	/* only threads can be underneath a gang */
> >  	if (path->dentry != path->dentry->d_sb->s_root) {
> >  		if ((flags & SPU_CREATE_GANG) ||
> >  		    !SPUFS_I(path->dentry->d_inode)->i_gang)
> > -			goto out;
> > +		goto fail;
> >  	}
> >  
> >  	mode &= ~current_umask();
> 
> These just change coding style, and not in a helpful way.

Oh I just renamed the label, it's helpful because the label is
specifically only for the fail case, not the general exit path, hence
"fail" is a better naming than "out". It's about code clarity.

> > @@ -640,12 +626,17 @@ long spufs_create(struct path *path, struct dentry *dentry,
> >  		ret = spufs_create_context(path->dentry->d_inode,
> >  					    dentry, path->mnt, flags, mode,
> >  					    filp);
> > -	if (ret >= 0)
> > +	if (ret >= 0) {
> > +		/* We drop these before fsnotify */
> > +		mutex_unlock(&inode->i_mutex);
> > +		dput(dentry);
> >  		fsnotify_mkdir(path->dentry->d_inode, dentry);
> > -	return ret;
> >  
> > -out:
> > -	mutex_unlock(&path->dentry->d_inode->i_mutex);
> > +		return ret;
> > +	}
> > + fail:
> > +	mutex_unlock(&inode->i_mutex);
> > +	dput(dentry);
> >  	return ret;
> >  }
> >  
> > diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c
> > index 8591bb6..1a65ef2 100644
> > --- a/arch/powerpc/platforms/cell/spufs/syscalls.c
> > +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c
> > @@ -70,11 +70,8 @@ static long do_spu_create(const char __user *pathname, unsigned int flags,
> >  	ret = PTR_ERR(dentry);
> >  	if (!IS_ERR(dentry)) {
> >  		ret = spufs_create(&path, dentry, flags, mode, neighbor);
> > -		mutex_unlock(&path.dentry->d_inode->i_mutex);
> > -		dput(dentry);
> >  		path_put(&path);
> >  	}
> > -
> >  	return ret;
> >  }
> 
> This moves the unlock in front of the fsnotify_mkdir, where it was before Al's
> change. This seems independent of the other change. 

No it's not, it all goes together. spufs_create_context() always
unlocked & dropped the dentry before returning, so I assumed the
lock had to be dropped before fsnotify.

Note that if the problem is that the lock has to be dropped before
spu_forget(), then we should indeed move it back into the leaf functions
and just remove all the unlock path from the top ones. It's a bit nasty
how we drop the mutex first, then do spu_forget, then drop the dentry
but we could go back to doing that.

What I want is consistent semantics. It's just silly to have 3 different
stacking levels which all 3 may or may not be responsible to dropping
the lock & dentry depending on circumstances.

In any case, what about this instead then:

diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index d4a094c..114ab14 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -646,6 +646,7 @@ long spufs_create(struct path *path, struct dentry *dentry,
 
 out:
 	mutex_unlock(&path->dentry->d_inode->i_mutex);
+	dput(dentry);
 	return ret;
 }
 
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c
index 8591bb6..5665dcc 100644
--- a/arch/powerpc/platforms/cell/spufs/syscalls.c
+++ b/arch/powerpc/platforms/cell/spufs/syscalls.c
@@ -70,8 +70,6 @@ static long do_spu_create(const char __user *pathname, unsigned int flags,
 	ret = PTR_ERR(dentry);
 	if (!IS_ERR(dentry)) {
 		ret = spufs_create(&path, dentry, flags, mode, neighbor);
-		mutex_unlock(&path.dentry->d_inode->i_mutex);
-		dput(dentry);
 		path_put(&path);
 	}
 
Cheers,
Ben.

^ permalink raw reply related

* Re: tlb flushing on Power
From: Seth Jennings @ 2012-03-07 21:18 UTC (permalink / raw)
  To: Michael Neuling; +Cc: Robert Jennings, linuxppc-dev, Nitin Gupta, Dave Hansen
In-Reply-To: <6006.1331098094@neuling.org>

On 03/06/2012 11:28 PM, Michael Neuling wrote:
> Seth,
> 
>> Thanks for the help!  I was wondering if you could take a look at something
>> for me.
>>
>> I've been working on this staging driver (zsmalloc memory allocator)
>> that does virtual mapping of two pages.
>>
>> I have a github repo with the driver and the unsubmitted changes.  I'm
>> trying to make to get the pte/tlb stuff working in a portable way:
>>
>> git://github.com/spartacus06/linux.git (portable branch)
>>
>> The experimental commits are the top 5 and the branch is based on
>> Greg's staging-next + frontswap-v11 patches.
>>
>> Could you take a look at the zs_map_object() and zs_unmap_object()
>> in drivers/staging/zsmalloc/zsmalloc-main.c and see if they should
>> work for PPC64?
> 
> I suggest you post the code directly to the list in reviewable chucks.
> People are much more likely to review it if they don't have to download
> some random git tree, checkout some branch, find the changes, etc etc.

It's hard to summarize out of context, but I'll try.

So zsmalloc is designed to store compressed memory pages.  In order
to do that efficiently in memory restricted environments where
memory allocations from the buddy allocator greater than order 0 are
very likely to fail, we have to be able to store compressed memory pages
across non-contiguous page boundaries.

zsmalloc uses virtual memory mapping to do this.  There is a per-cpu
struct vm_struct *vm.  This vm is initialized like this:
===
pte_t *vm_ptes[2];
vm = alloc_vm_area(2 * PAGE_SIZE, vm_ptes);
===

When the allocation needs to be accessed, we map the memory like this
(with preemption disabled):

set_pte_at(&init_mm, 0, vm_ptes[0], mk_pte(page1, PAGE_KERNEL));
set_pte_at(&init_mm, 0, vm_ptes[1], mk_pte(page2, PAGE_KERNEL));

Preemption remains disabled while the user manipulates the allocation.

When the user is done, we unmap by doing:
====
ptep_get_and_clear(&init_mm, vm->addr, vm_ptes[0]);
ptep_get_and_clear(&init_mm, vm->addr + PAGE_SIZE, vm_ptes[1]);

local_flush_tlb_kernel_page(vm->addr);
local_flush_tlb_kernel_page(vm->addr + PAGE_SIZE);
====

In my patch, I've defined local_flush_tlb_kernel_page as:

#define local_flush_tlb_kernel_page(kaddr) local_flush_tlb_page(NULL, kaddr)

in arch/powerpc/include/asm/tlbflush.h

For PPC64 (the platform I'm testing on) local_flush_tlb_page() is a no-op
because of the hashing tlb in that architecture; however, it isn't a no-op
on other archs and the whole point of this change is portability.

My understanding is that the tlb flush on PPC64 happens as a result of
the pte_update() eventually called from ptep_get_and_clear().

The problem is that this doesn't always seem to work.  I get corruption
in the mapped memory from time to time.  

I've isolated the issue to this mapping code.

Does anyone see anything glaringly wrong with this approach?

Should ptep_get_and_clear() also flush the tlb entry (asynchronously I think)?

For comparison, this code is stable on x86 where local_flush_tlb_kernel_page()
is defined to __flush_tlb_one().

> If it's work in progress, mark it as an RFC patch and note what issues
> you think still exist.  
> 
> Mikey

^ permalink raw reply

* Re: [PATCH] spufs raises two exceptions
From: Al Viro @ 2012-03-07 21:23 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, masterzorag, Arnd Bergmann
In-Reply-To: <1331154095.3105.25.camel@pasglop>


> No it's not, it all goes together. spufs_create_context() always
> unlocked & dropped the dentry before returning, so I assumed the
> lock had to be dropped before fsnotify.
> 
> Note that if the problem is that the lock has to be dropped before
> spu_forget(), then we should indeed move it back into the leaf functions
> and just remove all the unlock path from the top ones. It's a bit nasty
> how we drop the mutex first, then do spu_forget, then drop the dentry
> but we could go back to doing that.
> 
> What I want is consistent semantics. It's just silly to have 3 different
> stacking levels which all 3 may or may not be responsible to dropping
> the lock & dentry depending on circumstances.

Why not leave unlock/dput to the caller?  Details of deadlocks caused
by that approach, please...

^ permalink raw reply

* Re: [PATCH] powerpc/85xx: don't call of_platform_bus_probe() twice
From: Timur Tabi @ 2012-03-07 21:41 UTC (permalink / raw)
  To: Kumar Gala, benh, scottwood, dbaryshkov, linuxppc-dev
In-Reply-To: <1322669957-8259-1-git-send-email-timur@freescale.com>

Timur Tabi wrote:
> Commit 46d026ac ("powerpc/85xx: consolidate of_platform_bus_probe calls")
> replaced platform-specific of_device_id tables with a single function
> that probes the most of the busses in 85xx device trees.  If a specific
> platform needed additional busses probed, then it could call
> of_platform_bus_probe() again.  Typically, the additional platform-specific
> busses are children of existing busses that have already been probed.
> of_platform_bus_probe() does not handle those child busses automatically.
> 
> Unfortunately, this doesn't actually work.  The second (platform-specific)
> call to of_platform_bus_probe() never finds any of the busses it's asked
> to find.
> 
> To remedy this, the platform-specific of_device_id tables are eliminated,
> and their entries are merged into mpc85xx_common_ids[], so that all busses
> are probed at once.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---

Kumar, without this patch, audio is broken on the P1022DS in your 'merge'
branch.  I posted it back in November, six days after you applied the
patch that broke the P1022DS.

Is there any chance of getting this into 3.3?  This is a real bug fix, and
I would hate for audio to be broken in 3.3.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* [PATCH v3 10/34] powerpc/PCI: allow reallocation on PA Semi
From: Bjorn Helgaas @ 2012-03-07 22:32 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-arch, linux-pci, Olof Johansson, linuxppc-dev
In-Reply-To: <20120307222436.25669.52282.stgit@bhelgaas.mtv.corp.google.com>

We believe there's no reason to prevent reallocation on PA Semi, so
revert to the default of "allow reallocation if necessary."

CC: Olof Johansson <olof@lixom.net>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 arch/powerpc/platforms/pasemi/pci.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index b6a0ec4..aa86271 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -229,9 +229,6 @@ void __init pas_pci_init(void)
 
 	/* Setup the linkage between OF nodes and PHBs */
 	pci_devs_phb_init();
-
-	/* Use the common resource allocation mechanism */
-	pci_probe_only = 1;
 }
 
 void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset)

^ permalink raw reply related

* [PATCH v3 11/34] powerpc/PCI: replace pci_probe_only with pci_flags
From: Bjorn Helgaas @ 2012-03-07 22:33 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-arch, linux-pci, linuxppc-dev
In-Reply-To: <20120307222436.25669.52282.stgit@bhelgaas.mtv.corp.google.com>

We already use pci_flags, so this just sets pci_flags directly and removes
the intermediate step of figuring out pci_probe_only, then using it to set
pci_flags.

The PCI core provides a pci_flags definition (currently __weak), so drop
the powerpc definitions in favor of that.

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 arch/powerpc/include/asm/ppc-pci.h        |    2 --
 arch/powerpc/kernel/pci-common.c          |    3 ---
 arch/powerpc/kernel/pci_64.c              |    5 -----
 arch/powerpc/kernel/rtas_pci.c            |   10 +++++++---
 arch/powerpc/platforms/iseries/pci.c      |    2 +-
 arch/powerpc/platforms/maple/pci.c        |    2 +-
 arch/powerpc/platforms/powernv/pci-ioda.c |    5 ++---
 arch/powerpc/platforms/powernv/pci.c      |    2 +-
 arch/powerpc/platforms/pseries/setup.c    |    4 ++--
 9 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h
index 43268f1..f4f7ad8 100644
--- a/arch/powerpc/include/asm/ppc-pci.h
+++ b/arch/powerpc/include/asm/ppc-pci.h
@@ -45,8 +45,6 @@ extern void init_pci_config_tokens (void);
 extern unsigned long get_phb_buid (struct device_node *);
 extern int rtas_setup_phb(struct pci_controller *phb);
 
-extern unsigned long pci_probe_only;
-
 /* ---- EEH internal-use-only related routines ---- */
 #ifdef CONFIG_EEH
 
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index cce98d7..6d03da4 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -50,9 +50,6 @@ static int global_phb_number;		/* Global phb counter */
 /* ISA Memory physical address */
 resource_size_t isa_mem_base;
 
-/* Default PCI flags is 0 on ppc32, modified at boot on ppc64 */
-unsigned int pci_flags = 0;
-
 
 static struct dma_map_ops *pci_dma_ops = &dma_direct_ops;
 
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index f627eb7..75417fd 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -33,8 +33,6 @@
 #include <asm/machdep.h>
 #include <asm/ppc-pci.h>
 
-unsigned long pci_probe_only = 0;
-
 /* pci_io_base -- the base address from which io bars are offsets.
  * This is the lowest I/O base address (so bar values are always positive),
  * and it *must* be the start of ISA space if an ISA bus exists because
@@ -55,9 +53,6 @@ static int __init pcibios_init(void)
 	 */
 	ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot;
 
-	if (pci_probe_only)
-		pci_add_flags(PCI_PROBE_ONLY);
-
 	/* On ppc64, we always enable PCI domains and we keep domain 0
 	 * backward compatible in /proc for video cards
 	 */
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 6cd8f01..140735c 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -276,7 +276,7 @@ void __init find_and_init_phbs(void)
 	pci_devs_phb_init();
 
 	/*
-	 * pci_probe_only and pci_assign_all_buses can be set via properties
+	 * PCI_PROBE_ONLY and PCI_REASSIGN_ALL_BUS can be set via properties
 	 * in chosen.
 	 */
 	if (of_chosen) {
@@ -284,8 +284,12 @@ void __init find_and_init_phbs(void)
 
 		prop = of_get_property(of_chosen,
 				"linux,pci-probe-only", NULL);
-		if (prop)
-			pci_probe_only = *prop;
+		if (prop) {
+			if (*prop)
+				pci_add_flags(PCI_PROBE_ONLY);
+			else
+				pci_clear_flags(PCI_PROBE_ONLY);
+		}
 
 #ifdef CONFIG_PPC32 /* Will be made generic soon */
 		prop = of_get_property(of_chosen,
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index c754128..171b2f3 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -868,7 +868,7 @@ void __init iSeries_pcibios_init(void)
 	/* Install IO hooks */
 	ppc_pci_io = iseries_pci_io;
 
-	pci_probe_only = 1;
+	pci_add_flags(PCI_PROBE_ONLY);
 
 	/* iSeries has no IO space in the common sense, it needs to set
 	 * the IO base to 0
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 401e3f3..465ee8f 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -620,7 +620,7 @@ void __init maple_pci_init(void)
 	}
 
 	/* Tell pci.c to not change any resource allocations.  */
-	pci_probe_only = 1;
+	pci_add_flags(PCI_PROBE_ONLY);
 }
 
 int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 5e155df..fbdd74d 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -1299,15 +1299,14 @@ void __init pnv_pci_init_ioda1_phb(struct device_node *np)
 	/* Setup MSI support */
 	pnv_pci_init_ioda_msis(phb);
 
-	/* We set both probe_only and PCI_REASSIGN_ALL_RSRC. This is an
+	/* We set both PCI_PROBE_ONLY and PCI_REASSIGN_ALL_RSRC. This is an
 	 * odd combination which essentially means that we skip all resource
 	 * fixups and assignments in the generic code, and do it all
 	 * ourselves here
 	 */
-	pci_probe_only = 1;
 	ppc_md.pcibios_fixup_phb = pnv_pci_ioda_fixup_phb;
 	ppc_md.pcibios_enable_device_hook = pnv_pci_enable_device_hook;
-	pci_add_flags(PCI_REASSIGN_ALL_RSRC);
+	pci_add_flags(PCI_PROBE_ONLY | PCI_REASSIGN_ALL_RSRC);
 
 	/* Reset IODA tables to a clean state */
 	rc = opal_pci_reset(phb_id, OPAL_PCI_IODA_TABLE_RESET, OPAL_ASSERT_RESET);
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index a053f4f..69dca5a 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -555,7 +555,7 @@ void __init pnv_pci_init(void)
 {
 	struct device_node *np;
 
-	pci_set_flags(PCI_CAN_SKIP_ISA_ALIGN);
+	pci_add_flags(PCI_CAN_SKIP_ISA_ALIGN);
 
 	/* OPAL absent, try POPAL first then RTAS detection of PHBs */
 	if (!firmware_has_feature(FW_FEATURE_OPAL)) {
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 386e265..fc2a6f6 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -380,8 +380,8 @@ static void __init pSeries_setup_arch(void)
 
 	fwnmi_init();
 
-	/* By default, only probe PCI (can be overriden by rtas_pci */
-	pci_probe_only = 1;
+	/* By default, only probe PCI (can be overriden by rtas_pci) */
+	pci_add_flags(PCI_PROBE_ONLY);
 
 	/* Find and initialize PCI host bridges */
 	init_pci_config_tokens();

^ permalink raw reply related

* [PATCH v3 27/34] powerpc/PCI: get rid of device resource fixups
From: Bjorn Helgaas @ 2012-03-07 22:34 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-arch, linux-pci, linuxppc-dev
In-Reply-To: <20120307222436.25669.52282.stgit@bhelgaas.mtv.corp.google.com>

Tell the PCI core about host bridge address translation so it can take
care of bus-to-resource conversion for us.

Previously, powerpc used a HEADER quirk to perform this address fixup
in the following path:

    pci_device_add()
      pci_fixup_device(pci_fixup_header, dev)
        pcibios_fixup_resources()
	  fixup_resource()

This happened for both generic (via pci_scan_child_bus()) and
OF device tree enumeration (via of_scan_bus()).

This patch removes fixup_resource(), so the HEADER quirk no longer does
address fixup.  The generic path now does the fixup in __pci_read_base()
using the offsets supplied with pci_add_resource_offset().  The OF path
now does the fixup with new pcibios_bus_to_resource() calls in
of_pci_parse_addrs() and of_scan_pci_bridge().

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 arch/powerpc/include/asm/pci.h    |    9 +---
 arch/powerpc/kernel/pci-common.c  |   83 ++++---------------------------------
 arch/powerpc/kernel/pci_32.c      |    6 +--
 arch/powerpc/kernel/pci_64.c      |    2 -
 arch/powerpc/kernel/pci_of_scan.c |   12 ++++-
 5 files changed, 23 insertions(+), 89 deletions(-)

diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index f54b3d2..21fbeeb 100644
--- a/arch/powerpc/include/asm/pci.h
+++ b/arch/powerpc/include/asm/pci.h
@@ -154,13 +154,7 @@ extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
 
 #endif /* CONFIG_PPC64 */
 
-extern void pcibios_resource_to_bus(struct pci_dev *dev,
-			struct pci_bus_region *region,
-			struct resource *res);
-
-extern void pcibios_bus_to_resource(struct pci_dev *dev,
-			struct resource *res,
-			struct pci_bus_region *region);
+#define ARCH_HAS_GENERIC_PCI_OFFSETS
 
 extern void pcibios_claim_one_bus(struct pci_bus *b);
 
@@ -190,6 +184,7 @@ extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
 				 const struct resource *rsrc,
 				 resource_size_t *start, resource_size_t *end);
 
+extern resource_size_t pcibios_io_space_offset(struct pci_controller *hose);
 extern void pcibios_setup_bus_devices(struct pci_bus *bus);
 extern void pcibios_setup_bus_self(struct pci_bus *bus);
 extern void pcibios_setup_phb_io_space(struct pci_controller *hose);
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 6d03da4..2efd52d 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -846,60 +846,6 @@ int pci_proc_domain(struct pci_bus *bus)
 	return 1;
 }
 
-void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
-			     struct resource *res)
-{
-	resource_size_t offset = 0, mask = (resource_size_t)-1;
-	struct pci_controller *hose = pci_bus_to_host(dev->bus);
-
-	if (!hose)
-		return;
-	if (res->flags & IORESOURCE_IO) {
-		offset = (unsigned long)hose->io_base_virt - _IO_BASE;
-		mask = 0xffffffffu;
-	} else if (res->flags & IORESOURCE_MEM)
-		offset = hose->pci_mem_offset;
-
-	region->start = (res->start - offset) & mask;
-	region->end = (res->end - offset) & mask;
-}
-EXPORT_SYMBOL(pcibios_resource_to_bus);
-
-void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
-			     struct pci_bus_region *region)
-{
-	resource_size_t offset = 0, mask = (resource_size_t)-1;
-	struct pci_controller *hose = pci_bus_to_host(dev->bus);
-
-	if (!hose)
-		return;
-	if (res->flags & IORESOURCE_IO) {
-		offset = (unsigned long)hose->io_base_virt - _IO_BASE;
-		mask = 0xffffffffu;
-	} else if (res->flags & IORESOURCE_MEM)
-		offset = hose->pci_mem_offset;
-	res->start = (region->start + offset) & mask;
-	res->end = (region->end + offset) & mask;
-}
-EXPORT_SYMBOL(pcibios_bus_to_resource);
-
-/* Fixup a bus resource into a linux resource */
-static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
-{
-	struct pci_controller *hose = pci_bus_to_host(dev->bus);
-	resource_size_t offset = 0, mask = (resource_size_t)-1;
-
-	if (res->flags & IORESOURCE_IO) {
-		offset = (unsigned long)hose->io_base_virt - _IO_BASE;
-		mask = 0xffffffffu;
-	} else if (res->flags & IORESOURCE_MEM)
-		offset = hose->pci_mem_offset;
-
-	res->start = (res->start + offset) & mask;
-	res->end = (res->end + offset) & mask;
-}
-
-
 /* This header fixup will do the resource fixup for all devices as they are
  * probed, but not for bridge ranges
  */
@@ -939,18 +885,11 @@ static void __devinit pcibios_fixup_resources(struct pci_dev *dev)
 			continue;
 		}
 
-		pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] fixup...\n",
+		pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]\n",
 			 pci_name(dev), i,
 			 (unsigned long long)res->start,\
 			 (unsigned long long)res->end,
 			 (unsigned int)res->flags);
-
-		fixup_resource(res, dev);
-
-		pr_debug("PCI:%s            %016llx-%016llx\n",
-			 pci_name(dev),
-			 (unsigned long long)res->start,
-			 (unsigned long long)res->end);
 	}
 
 	/* Call machine specific resource fixup */
@@ -1052,27 +991,18 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
 			continue;
 		}
 
-		pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
+		pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x]\n",
 			 pci_name(dev), i,
 			 (unsigned long long)res->start,\
 			 (unsigned long long)res->end,
 			 (unsigned int)res->flags);
 
-		/* Perform fixup */
-		fixup_resource(res, dev);
-
 		/* Try to detect uninitialized P2P bridge resources,
 		 * and clear them out so they get re-assigned later
 		 */
 		if (pcibios_uninitialized_bridge_resource(bus, res)) {
 			res->flags = 0;
 			pr_debug("PCI:%s            (unassigned)\n", pci_name(dev));
-		} else {
-
-			pr_debug("PCI:%s            %016llx-%016llx\n",
-				 pci_name(dev),
-				 (unsigned long long)res->start,
-				 (unsigned long long)res->end);
 		}
 	}
 }
@@ -1562,6 +1492,11 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
 	return pci_enable_resources(dev, mask);
 }
 
+resource_size_t pcibios_io_space_offset(struct pci_controller *hose)
+{
+	return (unsigned long) hose->io_base_virt - _IO_BASE;
+}
+
 static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, struct list_head *resources)
 {
 	struct resource *res;
@@ -1586,7 +1521,7 @@ static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, s
 		 (unsigned long long)res->start,
 		 (unsigned long long)res->end,
 		 (unsigned long)res->flags);
-	pci_add_resource(resources, res);
+	pci_add_resource_offset(resources, res, pcibios_io_space_offset(hose));
 
 	/* Hookup PHB Memory resources */
 	for (i = 0; i < 3; ++i) {
@@ -1609,7 +1544,7 @@ static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, s
 			 (unsigned long long)res->start,
 			 (unsigned long long)res->end,
 			 (unsigned long)res->flags);
-		pci_add_resource(resources, res);
+		pci_add_resource_offset(resources, res, hose->pci_mem_offset);
 	}
 
 	pr_debug("PCI: PHB MEM offset     = %016llx\n",
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index fdd1a3d..4b06ec5 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -219,9 +219,9 @@ void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose)
 	struct resource *res = &hose->io_resource;
 
 	/* Fixup IO space offset */
-	io_offset = (unsigned long)hose->io_base_virt - isa_io_base;
-	res->start = (res->start + io_offset) & 0xffffffffu;
-	res->end = (res->end + io_offset) & 0xffffffffu;
+	io_offset = pcibios_io_space_offset(hose);
+	res->start += io_offset;
+	res->end += io_offset;
 }
 
 static int __init pcibios_init(void)
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 75417fd..94a54f6 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -168,7 +168,7 @@ static int __devinit pcibios_map_phb_io_space(struct pci_controller *hose)
 		return -ENOMEM;
 
 	/* Fixup hose IO resource */
-	io_virt_offset = (unsigned long)hose->io_base_virt - _IO_BASE;
+	io_virt_offset = pcibios_io_space_offset(hose);
 	hose->io_resource.start += io_virt_offset;
 	hose->io_resource.end += io_virt_offset;
 
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
index b37d0b5..89dde17 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -75,6 +75,7 @@ static void of_pci_parse_addrs(struct device_node *node, struct pci_dev *dev)
 {
 	u64 base, size;
 	unsigned int flags;
+	struct pci_bus_region region;
 	struct resource *res;
 	const u32 *addrs;
 	u32 i;
@@ -106,10 +107,11 @@ static void of_pci_parse_addrs(struct device_node *node, struct pci_dev *dev)
 			printk(KERN_ERR "PCI: bad cfg reg num 0x%x\n", i);
 			continue;
 		}
-		res->start = base;
-		res->end = base + size - 1;
 		res->flags = flags;
 		res->name = pci_name(dev);
+		region.start = base;
+		region.end = base + size - 1;
+		pcibios_bus_to_resource(dev, res, &region);
 	}
 }
 
@@ -209,6 +211,7 @@ void __devinit of_scan_pci_bridge(struct pci_dev *dev)
 	struct pci_bus *bus;
 	const u32 *busrange, *ranges;
 	int len, i, mode;
+	struct pci_bus_region region;
 	struct resource *res;
 	unsigned int flags;
 	u64 size;
@@ -270,9 +273,10 @@ void __devinit of_scan_pci_bridge(struct pci_dev *dev)
 			res = bus->resource[i];
 			++i;
 		}
-		res->start = of_read_number(&ranges[1], 2);
-		res->end = res->start + size - 1;
 		res->flags = flags;
+		region.start = of_read_number(&ranges[1], 2);
+		region.end = region.start + size - 1;
+		pcibios_bus_to_resource(dev, res, &region);
 	}
 	sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus),
 		bus->number);

^ permalink raw reply related

* Re: [PATCH v3 10/34] powerpc/PCI: allow reallocation on PA Semi
From: Olof Johansson @ 2012-03-07 22:35 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-arch, linux-pci, linuxppc-dev, Jesse Barnes
In-Reply-To: <20120307223255.25669.42520.stgit@bhelgaas.mtv.corp.google.com>

On Wed, Mar 7, 2012 at 2:32 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> We believe there's no reason to prevent reallocation on PA Semi, so
> revert to the default of "allow reallocation if necessary."
>
> CC: Olof Johansson <olof@lixom.net>
> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

Tested-by: Olof Johansson <olof@lixom.net>
Acked-by: Olof Johansson <olof@lixom.net>

^ permalink raw reply

* Re: [PATCH] spufs raises two exceptions
From: Arnd Bergmann @ 2012-03-07 22:32 UTC (permalink / raw)
  To: Al Viro; +Cc: linuxppc-dev, masterzorag
In-Reply-To: <20120307212330.GT23916@ZenIV.linux.org.uk>

On Wednesday 07 March 2012, Al Viro wrote:
> > No it's not, it all goes together. spufs_create_context() always
> > unlocked & dropped the dentry before returning, so I assumed the
> > lock had to be dropped before fsnotify.
> > 
> > Note that if the problem is that the lock has to be dropped before
> > spu_forget(), then we should indeed move it back into the leaf functions
> > and just remove all the unlock path from the top ones. It's a bit nasty
> > how we drop the mutex first, then do spu_forget, then drop the dentry
> > but we could go back to doing that.
> > 
> > What I want is consistent semantics. It's just silly to have 3 different
> > stacking levels which all 3 may or may not be responsible to dropping
> > the lock & dentry depending on circumstances.
> 
> Why not leave unlock/dput to the caller?  Details of deadlocks caused
> by that approach, please...

If only I could remember that part exactly. I think I was remembering
0309f02d8 "spufs: fix deadlock in spu_create error path", which had a
double lock problem in this path. Please bear with me here because it's
been six years since I debugged that particular problem.

A lot of the nastyness of spu_forget() is about the problem of having
to give up a reference on current->mm that is held by an spu context,
while the mm contains a vma that maps this context and holds a refence
on the inode, in particular in case of calling exit().

However, I don't see now how either of these two issues requires that
we call spu_forget without the i_mutex held during a context creation
failure.

	Arnd

^ permalink raw reply

* Re: [PATCH v2] powerpc/dts: fix the compatible string of sec 4.0
From: Kim Phillips @ 2012-03-07 23:26 UTC (permalink / raw)
  To: Shengzhou Liu; +Cc: linuxppc-dev, stable, Liu Shuo
In-Reply-To: <1331097606-22407-1-git-send-email-Shengzhou.Liu@freescale.com>

On Wed, 7 Mar 2012 13:20:06 +0800
Shengzhou Liu <Shengzhou.Liu@freescale.com> wrote:

> From: Liu Shuo <shuo.liu@freescale.com>
> 
> Fix the compatible string of sec 4.0 to match with CAMM driver according
> to Documentation/devicetree/bindings/crypto/fsl-sec4.txt
> 
> Signed-off-by: Liu Shuo <shuo.liu@freescale.com>
> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
> ---
> v2: refine description.

can we patch the caam driver to still work with "fsl-sec4.0"?

Thanks,

Kim

^ permalink raw reply

* linux-next: manual merge of the powerpc tree with the arm tree
From: Stephen Rothwell @ 2012-03-08  1:04 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: Russell King, linux-next, linux-kernel, Rob Herring

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

Hi all,

Today's linux-next merge of the powerpc tree got a conflict in
arch/powerpc/Kconfig between commit 2ed86b16eabe ("irq: make SPARSE_IRQ
an optionally hidden option") from the arm tree and commit ad5b7f1350c2
("powerpc: Make SPARSE_IRQ required") from the powerpc tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc arch/powerpc/Kconfig
index bf7dbc2,4eecaaa..0000000
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@@ -133,7 -133,8 +133,8 @@@ config PP
  	select HAVE_REGS_AND_STACK_ACCESS_API
  	select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64
  	select HAVE_GENERIC_HARDIRQS
 -	select HAVE_SPARSE_IRQ
 +	select MAY_HAVE_SPARSE_IRQ
+ 	select SPARSE_IRQ
  	select IRQ_PER_CPU
  	select GENERIC_IRQ_SHOW
  	select GENERIC_IRQ_SHOW_LEVEL

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

^ permalink raw reply

* Re: linux-next: manual merge of the powerpc tree with the arm tree
From: Michael Neuling @ 2012-03-08  2:33 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-kernel, Rob Herring, linux-next, Paul Mackerras,
	linuxppc-dev, Russell King
In-Reply-To: <20120308120422.e071cba36425eacbee1f8d98@canb.auug.org.au>

> Today's linux-next merge of the powerpc tree got a conflict in
> arch/powerpc/Kconfig between commit 2ed86b16eabe ("irq: make SPARSE_IRQ
> an optionally hidden option") from the arm tree and commit ad5b7f1350c2
> ("powerpc: Make SPARSE_IRQ required") from the powerpc tree.
> 
> I fixed it up (see below) and can carry the fix as necessary.
> --=20
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> 
> diff --cc arch/powerpc/Kconfig
> index bf7dbc2,4eecaaa..0000000
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@@ -133,7 -133,8 +133,8 @@@ config PP
>   	select HAVE_REGS_AND_STACK_ACCESS_API
>   	select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64
>   	select HAVE_GENERIC_HARDIRQS
>  -	select HAVE_SPARSE_IRQ
>  +	select MAY_HAVE_SPARSE_IRQ
> + 	select SPARSE_IRQ

Surely we only need SPARSE_IRQ now and not MAY_HAVE_SPARSE_IRQ.  

In fact, keeping MAY_HAVE_SPARSE_IRQ seems to make SPARSE_IRQ user
selectable, which we don't want anymore since ad5b7f1350c2.

Mikey

^ permalink raw reply

* RE: [PATCH v2] powerpc/dts: fix the compatible string of sec 4.0
From: Liu Shengzhou-B36685 @ 2012-03-08  2:59 UTC (permalink / raw)
  To: Phillips Kim-R1AAHA
  Cc: Liu Shuo-B35362, linuxppc-dev@lists.ozlabs.org, stable@kernel.org
In-Reply-To: <20120307172611.86985d2c22af2c3213770f35@freescale.com>



> -----Original Message-----
> From: Phillips Kim-R1AAHA
> Sent: Thursday, March 08, 2012 7:26 AM
> To: Liu Shengzhou-B36685
> Cc: linuxppc-dev@lists.ozlabs.org; stable@kernel.org; Liu Shuo-B35362
> Subject: Re: [PATCH v2] powerpc/dts: fix the compatible string of sec
> 4.0
>=20
> On Wed, 7 Mar 2012 13:20:06 +0800
> Shengzhou Liu <Shengzhou.Liu@freescale.com> wrote:
>=20
> > From: Liu Shuo <shuo.liu@freescale.com>
> >
> > Fix the compatible string of sec 4.0 to match with CAMM driver
> > according to Documentation/devicetree/bindings/crypto/fsl-sec4.txt
> >
> > Signed-off-by: Liu Shuo <shuo.liu@freescale.com>
> > Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
> > ---
> > v2: refine description.
>=20
> can we patch the caam driver to still work with "fsl-sec4.0"?
>=20
> Thanks,
>=20
> Kim
[Shengzhou] ok, I will post another patch for it. Thanks.

^ permalink raw reply


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