lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 05 Mar 2015 15:48:52 -0800
From:	David Daney <ddaney.cavm@...il.com>
To:	Aleksey Makarov <aleksey.makarov@...iga.com>
CC:	linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org,
	David Daney <david.daney@...ium.com>,
	Chandrakala Chavva <cchavva@...iumnetworks.com>,
	Ralf Baechle <ralf@...ux-mips.org>
Subject: Re: [PATCH] MIPS: OCTEON: Use correct CSR to soft reset

On 03/05/2015 07:06 AM, Aleksey Makarov wrote:
> From: Chandrakala Chavva <cchavva@...iumnetworks.com>
>
> This fixes reboot for Octeon III boards
>
> Signed-off-by: Chandrakala Chavva <cchavva@...iumnetworks.com>
> Signed-off-by: Aleksey Makarov <aleksey.makarov@...iga.com>

Let's make a change to this patch...

> ---
>   arch/mips/cavium-octeon/setup.c     | 5 ++++-
>   arch/mips/include/asm/octeon/cvmx.h | 6 +++++-
>   2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
> index 01130e9..73348af 100644
> --- a/arch/mips/cavium-octeon/setup.c
> +++ b/arch/mips/cavium-octeon/setup.c
> @@ -416,7 +416,10 @@ static void octeon_restart(char *command)
>
>   	mb();
>   	while (1)
> -		cvmx_write_csr(CVMX_CIU_SOFT_RST, 1);
> +		if (OCTEON_IS_OCTEON3())
> +			cvmx_write_csr(CVMX_RST_SOFT_RST, 1);
> +		else
> +			cvmx_write_csr(CVMX_CIU_SOFT_RST, 1);
>   }
>
>
> diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h
> index 33db1c8..fb575d7 100644
> --- a/arch/mips/include/asm/octeon/cvmx.h
> +++ b/arch/mips/include/asm/octeon/cvmx.h
> @@ -66,6 +66,7 @@ enum cvmx_mips_space {
>   #include <asm/octeon/cvmx-led-defs.h>
>   #include <asm/octeon/cvmx-mio-defs.h>
>   #include <asm/octeon/cvmx-pow-defs.h>
> +#include <asm/octeon/cvmx-rst-defs.h>
>
>   #include <asm/octeon/cvmx-bootinfo.h>
>   #include <asm/octeon/cvmx-bootmem.h>
> @@ -441,7 +442,10 @@ static inline void cvmx_reset_octeon(void)
>   	union cvmx_ciu_soft_rst ciu_soft_rst;
>   	ciu_soft_rst.u64 = 0;
>   	ciu_soft_rst.s.soft_rst = 1;
> -	cvmx_write_csr(CVMX_CIU_SOFT_RST, ciu_soft_rst.u64);
> +	if (OCTEON_IS_OCTEON3())
> +		cvmx_write_csr(CVMX_RST_SOFT_RST, ciu_soft_rst.u64);
> +	else
> +		cvmx_write_csr(CVMX_CIU_SOFT_RST, ciu_soft_rst.u64);
>   }


cvmx_reset_octeon() is unused in the kernel.  So instead of patching it 
up, remove it altogether, thus removing a little bit of ugliness from 
the world.

David Daney


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ