Thread (27 messages) 27 messages, 2 authors, 2015-09-25

Re: [PATCH v10 4/5] QE/CPM: move muram management functions to qe_common

From: Scott Wood <hidden>
Date: 2015-09-22 03:07:49
Also in: lkml

On Mon, 2015-09-21 at 22:06 -0500, Zhao Qiang-B45475 wrote:
On Tue, Sep 22, 2015 at 10:26AM +0800, Wood Scott-B07421 wrote:
quoted
-----Original Message-----
From: Wood Scott-B07421
Sent: Tuesday, September 22, 2015 10:26 AM
To: Zhao Qiang-B45475
Cc: linux-kernel@vger.kernel.org; linuxppc-dev@lists.ozlabs.org;
lauraa@codeaurora.org; Xie Xiaobo-R63061; benh@kernel.crashing.org; Li
Yang-Leo-R58472; paulus@samba.org
Subject: Re: [PATCH v10 4/5] QE/CPM: move muram management functions to
qe_common

On Mon, 2015-09-21 at 21:23 -0500, Zhao Qiang-B45475 wrote:
quoted
On Tue, Sep 22, 2015 at 06:54AM +0800, Wood Scott-B07421 wrote:
quoted
-----Original Message-----
From: Wood Scott-B07421
Sent: Tuesday, September 22, 2015 6:54 AM
To: Zhao Qiang-B45475
Cc: linux-kernel@vger.kernel.org; linuxppc-dev@lists.ozlabs.org;
lauraa@codeaurora.org; Xie Xiaobo-R63061; benh@kernel.crashing.org;
Li Yang-Leo-R58472; paulus@samba.org
Subject: Re: [PATCH v10 4/5] QE/CPM: move muram management functions
to qe_common

On Fri, Sep 18, 2015 at 03:15:20PM +0800, Zhao Qiang wrote:
quoted
QE and CPM have the same muram, they use the same management
functions. Now QE support both ARM and PowerPC, it is necessary to
move QE to "driver/soc", so move the muram management functions
from cpm_common to qe_common for preparing to move QE code to
"driver/soc"
quoted
quoted
quoted
Signed-off-by: Zhao Qiang <redacted>
---
Changes for v2:
  - no changes
Changes for v3:
  - no changes
Changes for v4:
  - no changes
Changes for v5:
  - no changes
Changes for v6:
  - using genalloc instead rheap to manage QE MURAM
  - remove qe_reset from platform file, using
  - subsys_initcall to call qe_init function.
Why is the init change in the same patch as moving the muram code?
quoted
Changes for v7:
  - move this patch from 3/3 to 2/3
  - convert cpm with genalloc
  - check for gen_pool allocation failure Changes for v8:
  - rebase
  - move BD_SC_* macro instead of copy Changes for v9:
  - doesn't modify CPM, add a new patch to modify.
  - rebase
Changes for v10:
  - rebase

 arch/powerpc/include/asm/cpm.h            |  59 --------
 arch/powerpc/include/asm/qe.h             |  51 ++++++-
 arch/powerpc/platforms/83xx/km83xx.c      |   2 -
 arch/powerpc/platforms/83xx/mpc832x_mds.c |   2 -
 arch/powerpc/platforms/83xx/mpc832x_rdb.c |   2 -
 arch/powerpc/platforms/83xx/mpc836x_mds.c |   2 -
 arch/powerpc/platforms/83xx/mpc836x_rdk.c |   3 -
 arch/powerpc/platforms/85xx/common.c      |   1 -
 arch/powerpc/sysdev/cpm_common.c          | 206 +-----------------
----
quoted
quoted
---
quoted
 arch/powerpc/sysdev/qe_lib/Makefile       |   2 +-
 arch/powerpc/sysdev/qe_lib/qe.c           |  15 ++
 arch/powerpc/sysdev/qe_lib/qe_common.c    | 242
++++++++++++++++++++++++++++++
quoted
 12 files changed, 302 insertions(+), 285 deletions(-)  create
mode
100644 arch/powerpc/sysdev/qe_lib/qe_common.c
diff --git a/arch/powerpc/include/asm/cpm.h
b/arch/powerpc/include/asm/cpm.h index 4398a6c..003a736 100644
--- a/arch/powerpc/include/asm/cpm.h
+++ b/arch/powerpc/include/asm/cpm.h
@@ -93,22 +93,6 @@ typedef struct cpm_buf_desc {
  */

 #define BD_SC_EMPTY      (0x8000)        /* Receive is empty */
-#define BD_SC_READY      (0x8000)        /* Transmit is ready */
-#define BD_SC_WRAP       (0x2000)        /* Last buffer descriptor
*/
quoted
quoted
quoted
-#define BD_SC_INTRPT     (0x1000)        /* Interrupt on change */
-#define BD_SC_LAST       (0x0800)        /* Last buffer in frame
*/
quoted
quoted
quoted
-#define BD_SC_TC (0x0400)        /* Transmit CRC */
-#define BD_SC_CM (0x0200)        /* Continuous mode */
-#define BD_SC_ID (0x0100)        /* Rec'd too many idles */
-#define BD_SC_P          (0x0100)        /* xmt preamble */
-#define BD_SC_BR (0x0020)        /* Break received */
-#define BD_SC_FR (0x0010)        /* Framing error */
-#define BD_SC_PR (0x0008)        /* Parity error */
-#define BD_SC_NAK        (0x0004)        /* NAK - did not respond
*/
quoted
quoted
quoted
-#define BD_SC_OV (0x0002)        /* Overrun */
-#define BD_SC_UN (0x0002)        /* Underrun */
-#define BD_SC_CD (0x0001)        /* */
-#define BD_SC_CL (0x0001)        /* Collision */
What does this have to do with muram?
BD is Buffer Descriptors, it is in muram.
What does it have to do with the muram *allocator*?
quoted
quoted
I've said many times now that any changes to the code, including
renaming functions, needs to be a separate patch from moving the code.
I have split a patch to two patches, However, Maybe I misunderstand
your means.
I didn't say "split it into two patches, however you like".  I said to
have all changes in one patch, and the other patch be nothing but a move.
Renaming the functions counts as a change.
quoted
So if the patch just do the renaming and moving cpm_muram function to
qe_muram function, Does it ok?
No.
Why? 
So that I can see the changes as a diff.
Moving cpm/qe_muram functions and renaming can't be split.
Why not?

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help