All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Octeon: Fix broken EDAC driver.
@ 2017-05-31 17:20 Steven J. Hill
  2017-07-19  9:39   ` James Hogan
  0 siblings, 1 reply; 7+ messages in thread
From: Steven J. Hill @ 2017-05-31 17:20 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle

From: "Steven J. Hill" <Steven.Hill@cavium.com>

Commit 15f6847 "MIPS: Octeon: Remove unused L2C types and macros."
broke the EDAC driver. Bring back 'cvmx-l2d-defs.h' file and the
missing types for L2C.

Signed-off-by: Steven J. Hill <steven.hill@cavium.com>
---
 arch/mips/include/asm/octeon/cvmx-l2c-defs.h | 37 ++++++++++++++++-
 arch/mips/include/asm/octeon/cvmx-l2d-defs.h | 60 ++++++++++++++++++++++++++++
 arch/mips/include/asm/octeon/cvmx.h          |  1 +
 3 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100644 arch/mips/include/asm/octeon/cvmx-l2d-defs.h

diff --git a/arch/mips/include/asm/octeon/cvmx-l2c-defs.h b/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
index d045973..3ea84ac 100644
--- a/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
@@ -33,6 +33,10 @@
 #define CVMX_L2C_DBG (CVMX_ADD_IO_SEG(0x0001180080000030ull))
 #define CVMX_L2C_CFG (CVMX_ADD_IO_SEG(0x0001180080000000ull))
 #define CVMX_L2C_CTL (CVMX_ADD_IO_SEG(0x0001180080800000ull))
+#define CVMX_L2C_ERR_TDTX(block_id)					       \
+	(CVMX_ADD_IO_SEG(0x0001180080A007E0ull) + ((block_id) & 3) * 0x40000ull)
+#define CVMX_L2C_ERR_TTGX(block_id)					       \
+	(CVMX_ADD_IO_SEG(0x0001180080A007E8ull) + ((block_id) & 3) * 0x40000ull)
 #define CVMX_L2C_LCKBASE (CVMX_ADD_IO_SEG(0x0001180080000058ull))
 #define CVMX_L2C_LCKOFF (CVMX_ADD_IO_SEG(0x0001180080000060ull))
 #define CVMX_L2C_PFCTL (CVMX_ADD_IO_SEG(0x0001180080000090ull))
@@ -66,9 +70,40 @@
 		((offset) & 1) * 8)
 #define CVMX_L2C_WPAR_PPX(offset) (CVMX_ADD_IO_SEG(0x0001180080840000ull)    + \
 		((offset) & 31) * 8)
-#define CVMX_L2D_FUS3 (CVMX_ADD_IO_SEG(0x00011800800007B8ull))
 
 
+union cvmx_l2c_err_tdtx {
+	uint64_t u64;
+	struct cvmx_l2c_err_tdtx_s {
+		__BITFIELD_FIELD(uint64_t dbe:1,
+		__BITFIELD_FIELD(uint64_t sbe:1,
+		__BITFIELD_FIELD(uint64_t vdbe:1,
+		__BITFIELD_FIELD(uint64_t vsbe:1,
+		__BITFIELD_FIELD(uint64_t syn:10,
+		__BITFIELD_FIELD(uint64_t reserved_22_49:28,
+		__BITFIELD_FIELD(uint64_t wayidx:18,
+		__BITFIELD_FIELD(uint64_t reserved_2_3:2,
+		__BITFIELD_FIELD(uint64_t type:2,
+		;)))))))))
+	} s;
+};
+
+union cvmx_l2c_err_ttgx {
+	uint64_t u64;
+	struct cvmx_l2c_err_ttgx_s {
+		__BITFIELD_FIELD(uint64_t dbe:1,
+		__BITFIELD_FIELD(uint64_t sbe:1,
+		__BITFIELD_FIELD(uint64_t noway:1,
+		__BITFIELD_FIELD(uint64_t reserved_56_60:5,
+		__BITFIELD_FIELD(uint64_t syn:6,
+		__BITFIELD_FIELD(uint64_t reserved_22_49:28,
+		__BITFIELD_FIELD(uint64_t wayidx:15,
+		__BITFIELD_FIELD(uint64_t reserved_2_6:5,
+		__BITFIELD_FIELD(uint64_t type:2,
+		;)))))))))
+	} s;
+};
+
 union cvmx_l2c_cfg {
 	uint64_t u64;
 	struct cvmx_l2c_cfg_s {
diff --git a/arch/mips/include/asm/octeon/cvmx-l2d-defs.h b/arch/mips/include/asm/octeon/cvmx-l2d-defs.h
new file mode 100644
index 0000000..a951ad5
--- /dev/null
+++ b/arch/mips/include/asm/octeon/cvmx-l2d-defs.h
@@ -0,0 +1,60 @@
+/***********************license start***************
+ * Author: Cavium Networks
+ *
+ * Contact: support@caviumnetworks.com
+ * This file is part of the OCTEON SDK
+ *
+ * Copyright (c) 2003-2017 Cavium, Inc.
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, Version 2, as
+ * published by the Free Software Foundation.
+ *
+ * This file is distributed in the hope that it will be useful, but
+ * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
+ * NONINFRINGEMENT.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this file; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * or visit http://www.gnu.org/licenses/.
+ *
+ * This file may also be available under a different license from Cavium.
+ * Contact Cavium Networks for more information
+ ***********************license end**************************************/
+
+#ifndef __CVMX_L2D_DEFS_H__
+#define __CVMX_L2D_DEFS_H__
+
+#define CVMX_L2D_ERR	(CVMX_ADD_IO_SEG(0x0001180080000010ull))
+#define CVMX_L2D_FUS3	(CVMX_ADD_IO_SEG(0x00011800800007B8ull))
+
+
+union cvmx_l2d_err {
+	uint64_t u64;
+	struct cvmx_l2d_err_s {
+		__BITFIELD_FIELD(uint64_t reserved_6_63:58,
+		__BITFIELD_FIELD(uint64_t bmhclsel:1,
+		__BITFIELD_FIELD(uint64_t ded_err:1,
+		__BITFIELD_FIELD(uint64_t sec_err:1,
+		__BITFIELD_FIELD(uint64_t ded_intena:1,
+		__BITFIELD_FIELD(uint64_t sec_intena:1,
+		__BITFIELD_FIELD(uint64_t ecc_ena:1,
+		;)))))))
+	} s;
+};
+
+union cvmx_l2d_fus3 {
+	uint64_t u64;
+	struct cvmx_l2d_fus3_s {
+		__BITFIELD_FIELD(uint64_t reserved_40_63:24,
+		__BITFIELD_FIELD(uint64_t ema_ctl:3,
+		__BITFIELD_FIELD(uint64_t reserved_34_36:3,
+		__BITFIELD_FIELD(uint64_t q3fus:34,
+		;))))
+	} s;
+};
+
+#endif
diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h
index 9742202..e638735 100644
--- a/arch/mips/include/asm/octeon/cvmx.h
+++ b/arch/mips/include/asm/octeon/cvmx.h
@@ -62,6 +62,7 @@ enum cvmx_mips_space {
 #include <asm/octeon/cvmx-iob-defs.h>
 #include <asm/octeon/cvmx-ipd-defs.h>
 #include <asm/octeon/cvmx-l2c-defs.h>
+#include <asm/octeon/cvmx-l2d-defs.h>
 #include <asm/octeon/cvmx-l2t-defs.h>
 #include <asm/octeon/cvmx-led-defs.h>
 #include <asm/octeon/cvmx-mio-defs.h>
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: Octeon: Fix broken EDAC driver.
@ 2017-07-19  9:39   ` James Hogan
  0 siblings, 0 replies; 7+ messages in thread
From: James Hogan @ 2017-07-19  9:39 UTC (permalink / raw)
  To: Steven J. Hill; +Cc: linux-mips, Ralf Baechle

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

On Wed, May 31, 2017 at 12:20:47PM -0500, Steven J. Hill wrote:
> From: "Steven J. Hill" <Steven.Hill@cavium.com>
> 
> Commit 15f6847 "MIPS: Octeon: Remove unused L2C types and macros."

Please use 12 nibbles of hash and I think brackets around the subject is
common style, i.e.

Commit 15f6847923a8 ("MIPS: Octeon: Remove unused L2C types and
macros.") broke the EDAC driver...

> broke the EDAC driver. Bring back 'cvmx-l2d-defs.h' file and the
> missing types for L2C.
> 

Lets add:
Fixes: 15f6847923a8 ("MIPS: Octeon: Remove unused L2C types and macros.")

> Signed-off-by: Steven J. Hill <steven.hill@cavium.com>

I suppose we need this too now that 4.12 is out:
Cc: <stable@vger.kernel.org> # 4.12+

(Maybe Ralf can fix that stuff up when applying?)

The patch looks correct based on the definitions removed in the patch it
fixes, and it does indeed fix the build errors, so:

Reviewed-by: James Hogan <james.hogan@imgtec.com>

Though this warning persists:

drivers/edac/octeon_edac-lmc.c In function ‘octeon_lmc_edac_poll_o2’:
drivers/edac/octeon_edac-lmc.c:87:24: warning: ‘((long unsigned int*)&int_reg)[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (int_reg.s.sec_err || int_reg.s.ded_err) {
                        ^

Thanks
James

> ---
>  arch/mips/include/asm/octeon/cvmx-l2c-defs.h | 37 ++++++++++++++++-
>  arch/mips/include/asm/octeon/cvmx-l2d-defs.h | 60 ++++++++++++++++++++++++++++
>  arch/mips/include/asm/octeon/cvmx.h          |  1 +
>  3 files changed, 97 insertions(+), 1 deletion(-)
>  create mode 100644 arch/mips/include/asm/octeon/cvmx-l2d-defs.h
> 
> diff --git a/arch/mips/include/asm/octeon/cvmx-l2c-defs.h b/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
> index d045973..3ea84ac 100644
> --- a/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
> +++ b/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
> @@ -33,6 +33,10 @@
>  #define CVMX_L2C_DBG (CVMX_ADD_IO_SEG(0x0001180080000030ull))
>  #define CVMX_L2C_CFG (CVMX_ADD_IO_SEG(0x0001180080000000ull))
>  #define CVMX_L2C_CTL (CVMX_ADD_IO_SEG(0x0001180080800000ull))
> +#define CVMX_L2C_ERR_TDTX(block_id)					       \
> +	(CVMX_ADD_IO_SEG(0x0001180080A007E0ull) + ((block_id) & 3) * 0x40000ull)
> +#define CVMX_L2C_ERR_TTGX(block_id)					       \
> +	(CVMX_ADD_IO_SEG(0x0001180080A007E8ull) + ((block_id) & 3) * 0x40000ull)
>  #define CVMX_L2C_LCKBASE (CVMX_ADD_IO_SEG(0x0001180080000058ull))
>  #define CVMX_L2C_LCKOFF (CVMX_ADD_IO_SEG(0x0001180080000060ull))
>  #define CVMX_L2C_PFCTL (CVMX_ADD_IO_SEG(0x0001180080000090ull))
> @@ -66,9 +70,40 @@
>  		((offset) & 1) * 8)
>  #define CVMX_L2C_WPAR_PPX(offset) (CVMX_ADD_IO_SEG(0x0001180080840000ull)    + \
>  		((offset) & 31) * 8)
> -#define CVMX_L2D_FUS3 (CVMX_ADD_IO_SEG(0x00011800800007B8ull))
>  
>  
> +union cvmx_l2c_err_tdtx {
> +	uint64_t u64;
> +	struct cvmx_l2c_err_tdtx_s {
> +		__BITFIELD_FIELD(uint64_t dbe:1,
> +		__BITFIELD_FIELD(uint64_t sbe:1,
> +		__BITFIELD_FIELD(uint64_t vdbe:1,
> +		__BITFIELD_FIELD(uint64_t vsbe:1,
> +		__BITFIELD_FIELD(uint64_t syn:10,
> +		__BITFIELD_FIELD(uint64_t reserved_22_49:28,
> +		__BITFIELD_FIELD(uint64_t wayidx:18,
> +		__BITFIELD_FIELD(uint64_t reserved_2_3:2,
> +		__BITFIELD_FIELD(uint64_t type:2,
> +		;)))))))))
> +	} s;
> +};
> +
> +union cvmx_l2c_err_ttgx {
> +	uint64_t u64;
> +	struct cvmx_l2c_err_ttgx_s {
> +		__BITFIELD_FIELD(uint64_t dbe:1,
> +		__BITFIELD_FIELD(uint64_t sbe:1,
> +		__BITFIELD_FIELD(uint64_t noway:1,
> +		__BITFIELD_FIELD(uint64_t reserved_56_60:5,
> +		__BITFIELD_FIELD(uint64_t syn:6,
> +		__BITFIELD_FIELD(uint64_t reserved_22_49:28,
> +		__BITFIELD_FIELD(uint64_t wayidx:15,
> +		__BITFIELD_FIELD(uint64_t reserved_2_6:5,
> +		__BITFIELD_FIELD(uint64_t type:2,
> +		;)))))))))
> +	} s;
> +};
> +
>  union cvmx_l2c_cfg {
>  	uint64_t u64;
>  	struct cvmx_l2c_cfg_s {
> diff --git a/arch/mips/include/asm/octeon/cvmx-l2d-defs.h b/arch/mips/include/asm/octeon/cvmx-l2d-defs.h
> new file mode 100644
> index 0000000..a951ad5
> --- /dev/null
> +++ b/arch/mips/include/asm/octeon/cvmx-l2d-defs.h
> @@ -0,0 +1,60 @@
> +/***********************license start***************
> + * Author: Cavium Networks
> + *
> + * Contact: support@caviumnetworks.com
> + * This file is part of the OCTEON SDK
> + *
> + * Copyright (c) 2003-2017 Cavium, Inc.
> + *
> + * This file is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License, Version 2, as
> + * published by the Free Software Foundation.
> + *
> + * This file is distributed in the hope that it will be useful, but
> + * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
> + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
> + * NONINFRINGEMENT.  See the GNU General Public License for more
> + * details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this file; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
> + * or visit http://www.gnu.org/licenses/.
> + *
> + * This file may also be available under a different license from Cavium.
> + * Contact Cavium Networks for more information
> + ***********************license end**************************************/
> +
> +#ifndef __CVMX_L2D_DEFS_H__
> +#define __CVMX_L2D_DEFS_H__
> +
> +#define CVMX_L2D_ERR	(CVMX_ADD_IO_SEG(0x0001180080000010ull))
> +#define CVMX_L2D_FUS3	(CVMX_ADD_IO_SEG(0x00011800800007B8ull))
> +
> +
> +union cvmx_l2d_err {
> +	uint64_t u64;
> +	struct cvmx_l2d_err_s {
> +		__BITFIELD_FIELD(uint64_t reserved_6_63:58,
> +		__BITFIELD_FIELD(uint64_t bmhclsel:1,
> +		__BITFIELD_FIELD(uint64_t ded_err:1,
> +		__BITFIELD_FIELD(uint64_t sec_err:1,
> +		__BITFIELD_FIELD(uint64_t ded_intena:1,
> +		__BITFIELD_FIELD(uint64_t sec_intena:1,
> +		__BITFIELD_FIELD(uint64_t ecc_ena:1,
> +		;)))))))
> +	} s;
> +};
> +
> +union cvmx_l2d_fus3 {
> +	uint64_t u64;
> +	struct cvmx_l2d_fus3_s {
> +		__BITFIELD_FIELD(uint64_t reserved_40_63:24,
> +		__BITFIELD_FIELD(uint64_t ema_ctl:3,
> +		__BITFIELD_FIELD(uint64_t reserved_34_36:3,
> +		__BITFIELD_FIELD(uint64_t q3fus:34,
> +		;))))
> +	} s;
> +};
> +
> +#endif
> diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h
> index 9742202..e638735 100644
> --- a/arch/mips/include/asm/octeon/cvmx.h
> +++ b/arch/mips/include/asm/octeon/cvmx.h
> @@ -62,6 +62,7 @@ enum cvmx_mips_space {
>  #include <asm/octeon/cvmx-iob-defs.h>
>  #include <asm/octeon/cvmx-ipd-defs.h>
>  #include <asm/octeon/cvmx-l2c-defs.h>
> +#include <asm/octeon/cvmx-l2d-defs.h>
>  #include <asm/octeon/cvmx-l2t-defs.h>
>  #include <asm/octeon/cvmx-led-defs.h>
>  #include <asm/octeon/cvmx-mio-defs.h>
> -- 
> 2.1.4
> 
> 

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: Octeon: Fix broken EDAC driver.
@ 2017-07-19  9:39   ` James Hogan
  0 siblings, 0 replies; 7+ messages in thread
From: James Hogan @ 2017-07-19  9:39 UTC (permalink / raw)
  To: Steven J. Hill; +Cc: linux-mips, Ralf Baechle

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

On Wed, May 31, 2017 at 12:20:47PM -0500, Steven J. Hill wrote:
> From: "Steven J. Hill" <Steven.Hill@cavium.com>
> 
> Commit 15f6847 "MIPS: Octeon: Remove unused L2C types and macros."

Please use 12 nibbles of hash and I think brackets around the subject is
common style, i.e.

Commit 15f6847923a8 ("MIPS: Octeon: Remove unused L2C types and
macros.") broke the EDAC driver...

> broke the EDAC driver. Bring back 'cvmx-l2d-defs.h' file and the
> missing types for L2C.
> 

Lets add:
Fixes: 15f6847923a8 ("MIPS: Octeon: Remove unused L2C types and macros.")

> Signed-off-by: Steven J. Hill <steven.hill@cavium.com>

I suppose we need this too now that 4.12 is out:
Cc: <stable@vger.kernel.org> # 4.12+

(Maybe Ralf can fix that stuff up when applying?)

The patch looks correct based on the definitions removed in the patch it
fixes, and it does indeed fix the build errors, so:

Reviewed-by: James Hogan <james.hogan@imgtec.com>

Though this warning persists:

drivers/edac/octeon_edac-lmc.c In function ‘octeon_lmc_edac_poll_o2’:
drivers/edac/octeon_edac-lmc.c:87:24: warning: ‘((long unsigned int*)&int_reg)[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (int_reg.s.sec_err || int_reg.s.ded_err) {
                        ^

Thanks
James

> ---
>  arch/mips/include/asm/octeon/cvmx-l2c-defs.h | 37 ++++++++++++++++-
>  arch/mips/include/asm/octeon/cvmx-l2d-defs.h | 60 ++++++++++++++++++++++++++++
>  arch/mips/include/asm/octeon/cvmx.h          |  1 +
>  3 files changed, 97 insertions(+), 1 deletion(-)
>  create mode 100644 arch/mips/include/asm/octeon/cvmx-l2d-defs.h
> 
> diff --git a/arch/mips/include/asm/octeon/cvmx-l2c-defs.h b/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
> index d045973..3ea84ac 100644
> --- a/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
> +++ b/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
> @@ -33,6 +33,10 @@
>  #define CVMX_L2C_DBG (CVMX_ADD_IO_SEG(0x0001180080000030ull))
>  #define CVMX_L2C_CFG (CVMX_ADD_IO_SEG(0x0001180080000000ull))
>  #define CVMX_L2C_CTL (CVMX_ADD_IO_SEG(0x0001180080800000ull))
> +#define CVMX_L2C_ERR_TDTX(block_id)					       \
> +	(CVMX_ADD_IO_SEG(0x0001180080A007E0ull) + ((block_id) & 3) * 0x40000ull)
> +#define CVMX_L2C_ERR_TTGX(block_id)					       \
> +	(CVMX_ADD_IO_SEG(0x0001180080A007E8ull) + ((block_id) & 3) * 0x40000ull)
>  #define CVMX_L2C_LCKBASE (CVMX_ADD_IO_SEG(0x0001180080000058ull))
>  #define CVMX_L2C_LCKOFF (CVMX_ADD_IO_SEG(0x0001180080000060ull))
>  #define CVMX_L2C_PFCTL (CVMX_ADD_IO_SEG(0x0001180080000090ull))
> @@ -66,9 +70,40 @@
>  		((offset) & 1) * 8)
>  #define CVMX_L2C_WPAR_PPX(offset) (CVMX_ADD_IO_SEG(0x0001180080840000ull)    + \
>  		((offset) & 31) * 8)
> -#define CVMX_L2D_FUS3 (CVMX_ADD_IO_SEG(0x00011800800007B8ull))
>  
>  
> +union cvmx_l2c_err_tdtx {
> +	uint64_t u64;
> +	struct cvmx_l2c_err_tdtx_s {
> +		__BITFIELD_FIELD(uint64_t dbe:1,
> +		__BITFIELD_FIELD(uint64_t sbe:1,
> +		__BITFIELD_FIELD(uint64_t vdbe:1,
> +		__BITFIELD_FIELD(uint64_t vsbe:1,
> +		__BITFIELD_FIELD(uint64_t syn:10,
> +		__BITFIELD_FIELD(uint64_t reserved_22_49:28,
> +		__BITFIELD_FIELD(uint64_t wayidx:18,
> +		__BITFIELD_FIELD(uint64_t reserved_2_3:2,
> +		__BITFIELD_FIELD(uint64_t type:2,
> +		;)))))))))
> +	} s;
> +};
> +
> +union cvmx_l2c_err_ttgx {
> +	uint64_t u64;
> +	struct cvmx_l2c_err_ttgx_s {
> +		__BITFIELD_FIELD(uint64_t dbe:1,
> +		__BITFIELD_FIELD(uint64_t sbe:1,
> +		__BITFIELD_FIELD(uint64_t noway:1,
> +		__BITFIELD_FIELD(uint64_t reserved_56_60:5,
> +		__BITFIELD_FIELD(uint64_t syn:6,
> +		__BITFIELD_FIELD(uint64_t reserved_22_49:28,
> +		__BITFIELD_FIELD(uint64_t wayidx:15,
> +		__BITFIELD_FIELD(uint64_t reserved_2_6:5,
> +		__BITFIELD_FIELD(uint64_t type:2,
> +		;)))))))))
> +	} s;
> +};
> +
>  union cvmx_l2c_cfg {
>  	uint64_t u64;
>  	struct cvmx_l2c_cfg_s {
> diff --git a/arch/mips/include/asm/octeon/cvmx-l2d-defs.h b/arch/mips/include/asm/octeon/cvmx-l2d-defs.h
> new file mode 100644
> index 0000000..a951ad5
> --- /dev/null
> +++ b/arch/mips/include/asm/octeon/cvmx-l2d-defs.h
> @@ -0,0 +1,60 @@
> +/***********************license start***************
> + * Author: Cavium Networks
> + *
> + * Contact: support@caviumnetworks.com
> + * This file is part of the OCTEON SDK
> + *
> + * Copyright (c) 2003-2017 Cavium, Inc.
> + *
> + * This file is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License, Version 2, as
> + * published by the Free Software Foundation.
> + *
> + * This file is distributed in the hope that it will be useful, but
> + * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
> + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
> + * NONINFRINGEMENT.  See the GNU General Public License for more
> + * details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this file; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
> + * or visit http://www.gnu.org/licenses/.
> + *
> + * This file may also be available under a different license from Cavium.
> + * Contact Cavium Networks for more information
> + ***********************license end**************************************/
> +
> +#ifndef __CVMX_L2D_DEFS_H__
> +#define __CVMX_L2D_DEFS_H__
> +
> +#define CVMX_L2D_ERR	(CVMX_ADD_IO_SEG(0x0001180080000010ull))
> +#define CVMX_L2D_FUS3	(CVMX_ADD_IO_SEG(0x00011800800007B8ull))
> +
> +
> +union cvmx_l2d_err {
> +	uint64_t u64;
> +	struct cvmx_l2d_err_s {
> +		__BITFIELD_FIELD(uint64_t reserved_6_63:58,
> +		__BITFIELD_FIELD(uint64_t bmhclsel:1,
> +		__BITFIELD_FIELD(uint64_t ded_err:1,
> +		__BITFIELD_FIELD(uint64_t sec_err:1,
> +		__BITFIELD_FIELD(uint64_t ded_intena:1,
> +		__BITFIELD_FIELD(uint64_t sec_intena:1,
> +		__BITFIELD_FIELD(uint64_t ecc_ena:1,
> +		;)))))))
> +	} s;
> +};
> +
> +union cvmx_l2d_fus3 {
> +	uint64_t u64;
> +	struct cvmx_l2d_fus3_s {
> +		__BITFIELD_FIELD(uint64_t reserved_40_63:24,
> +		__BITFIELD_FIELD(uint64_t ema_ctl:3,
> +		__BITFIELD_FIELD(uint64_t reserved_34_36:3,
> +		__BITFIELD_FIELD(uint64_t q3fus:34,
> +		;))))
> +	} s;
> +};
> +
> +#endif
> diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h
> index 9742202..e638735 100644
> --- a/arch/mips/include/asm/octeon/cvmx.h
> +++ b/arch/mips/include/asm/octeon/cvmx.h
> @@ -62,6 +62,7 @@ enum cvmx_mips_space {
>  #include <asm/octeon/cvmx-iob-defs.h>
>  #include <asm/octeon/cvmx-ipd-defs.h>
>  #include <asm/octeon/cvmx-l2c-defs.h>
> +#include <asm/octeon/cvmx-l2d-defs.h>
>  #include <asm/octeon/cvmx-l2t-defs.h>
>  #include <asm/octeon/cvmx-led-defs.h>
>  #include <asm/octeon/cvmx-mio-defs.h>
> -- 
> 2.1.4
> 
> 

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: Octeon: Fix broken EDAC driver.
  2017-07-19  9:39   ` James Hogan
  (?)
@ 2017-07-19 14:21   ` Ralf Baechle
  2017-07-19 15:16       ` James Hogan
  -1 siblings, 1 reply; 7+ messages in thread
From: Ralf Baechle @ 2017-07-19 14:21 UTC (permalink / raw)
  To: James Hogan; +Cc: Steven J. Hill, linux-mips

On Wed, Jul 19, 2017 at 10:39:19AM +0100, James Hogan wrote:
> Date:   Wed, 19 Jul 2017 10:39:19 +0100
> From: James Hogan <james.hogan@imgtec.com>
> To: "Steven J. Hill" <steven.hill@cavium.com>
> CC: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
> Subject: Re: [PATCH] MIPS: Octeon: Fix broken EDAC driver.
> Content-Type: multipart/signed; micalg=pgp-sha256;
>         protocol="application/pgp-signature"; boundary="y2MHPAl/EzyWgzIZ"
> 
> On Wed, May 31, 2017 at 12:20:47PM -0500, Steven J. Hill wrote:
> > From: "Steven J. Hill" <Steven.Hill@cavium.com>
> > 
> > Commit 15f6847 "MIPS: Octeon: Remove unused L2C types and macros."
> 
> Please use 12 nibbles of hash and I think brackets around the subject is
> common style, i.e.
> 
> Commit 15f6847923a8 ("MIPS: Octeon: Remove unused L2C types and
> macros.") broke the EDAC driver...
> 
> > broke the EDAC driver. Bring back 'cvmx-l2d-defs.h' file and the
> > missing types for L2C.
> > 
> 
> Lets add:
> Fixes: 15f6847923a8 ("MIPS: Octeon: Remove unused L2C types and macros.")
> 
> > Signed-off-by: Steven J. Hill <steven.hill@cavium.com>
> 
> I suppose we need this too now that 4.12 is out:
> Cc: <stable@vger.kernel.org> # 4.12+
> 
> (Maybe Ralf can fix that stuff up when applying?)

I think the Cc: to stable is not necessary with the Fixes: tag.

> The patch looks correct based on the definitions removed in the patch it
> fixes, and it does indeed fix the build errors, so:
> 
> Reviewed-by: James Hogan <james.hogan@imgtec.com>
> 
> Though this warning persists:
> 
> drivers/edac/octeon_edac-lmc.c In function ‘octeon_lmc_edac_poll_o2’:
> drivers/edac/octeon_edac-lmc.c:87:24: warning: ‘((long unsigned int*)&int_reg)[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>   if (int_reg.s.sec_err || int_reg.s.ded_err) {

Steven, can you sort this?  Thanks,

  Ralf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: Octeon: Fix broken EDAC driver.
@ 2017-07-19 15:16       ` James Hogan
  0 siblings, 0 replies; 7+ messages in thread
From: James Hogan @ 2017-07-19 15:16 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Steven J. Hill, linux-mips

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

On Wed, Jul 19, 2017 at 04:21:05PM +0200, Ralf Baechle wrote:
> On Wed, Jul 19, 2017 at 10:39:19AM +0100, James Hogan wrote:
> > I suppose we need this too now that 4.12 is out:
> > Cc: <stable@vger.kernel.org> # 4.12+
> > 
> > (Maybe Ralf can fix that stuff up when applying?)
> 
> I think the Cc: to stable is not necessary with the Fixes: tag.

I think the Cc is still advisable:
amalon> gregkh: Does a fixes tag make Cc: stable unnecessary? (I thought not but maybe I'm mistaken)
gregkh> amalon: nope.  I do try to read all patches that do not have a cc: stable but just a fixes, but I don't always get to them, and they are _much_ lower priority.
gregkh> amalon: so always cc: stable please.

Cheers
James

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: Octeon: Fix broken EDAC driver.
@ 2017-07-19 15:16       ` James Hogan
  0 siblings, 0 replies; 7+ messages in thread
From: James Hogan @ 2017-07-19 15:16 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Steven J. Hill, linux-mips

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

On Wed, Jul 19, 2017 at 04:21:05PM +0200, Ralf Baechle wrote:
> On Wed, Jul 19, 2017 at 10:39:19AM +0100, James Hogan wrote:
> > I suppose we need this too now that 4.12 is out:
> > Cc: <stable@vger.kernel.org> # 4.12+
> > 
> > (Maybe Ralf can fix that stuff up when applying?)
> 
> I think the Cc: to stable is not necessary with the Fixes: tag.

I think the Cc is still advisable:
amalon> gregkh: Does a fixes tag make Cc: stable unnecessary? (I thought not but maybe I'm mistaken)
gregkh> amalon: nope.  I do try to read all patches that do not have a cc: stable but just a fixes, but I don't always get to them, and they are _much_ lower priority.
gregkh> amalon: so always cc: stable please.

Cheers
James

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: Octeon: Fix broken EDAC driver.
  2017-07-19 15:16       ` James Hogan
  (?)
@ 2017-07-19 15:32       ` Steven J. Hill
  -1 siblings, 0 replies; 7+ messages in thread
From: Steven J. Hill @ 2017-07-19 15:32 UTC (permalink / raw)
  To: James Hogan, Ralf Baechle; +Cc: linux-mips

I'll respin this patch and post shortly.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-19 15:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31 17:20 [PATCH] MIPS: Octeon: Fix broken EDAC driver Steven J. Hill
2017-07-19  9:39 ` James Hogan
2017-07-19  9:39   ` James Hogan
2017-07-19 14:21   ` Ralf Baechle
2017-07-19 15:16     ` James Hogan
2017-07-19 15:16       ` James Hogan
2017-07-19 15:32       ` Steven J. Hill

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.