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]
Message-ID: <CAMk6uBnVnSo_B9GUz3wwe-T659Kr+EuHCXxRObXE51gpBUPeQQ@mail.gmail.com>
Date:	Thu, 12 Feb 2015 11:51:02 +0800
From:	Steven Miao <realmz6@...il.com>
To:	Nicholas Mc Guire <hofrat@...dl.org>
Cc:	Christoph Lameter <cl@...ux.com>, Tejun Heo <tj@...nel.org>,
	bfin <adi-buildroot-devel@...ts.sourceforge.net>,
	"open list:CAN NETWORK DRIVERS <linux-can@...r.kernel.org>, open
	list:NETWORKING DRIVERS <netdev@...r.kernel.org>, open list" 
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC] blackfin: make timeout HZ independent

Applied. Thanks.

On Wed, Feb 11, 2015 at 2:52 PM, Nicholas Mc Guire <hofrat@...dl.org> wrote:
> The timeout is in jiffies so the hard-coded numeric value becomes HZ
> dependent, which is probably not the intent. To resolve this the
> timeout is converted with msecs_to_jiffies.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@...dl.org>
> ---
>
> Due to tool-chain problems this patch was not even compile tested, further
> it is unclear if the interpretation of 5000 as 5000 milliseconds is even
> correct it is based on looking at other archs (e.g arch/arm64/kernel/smp.c,
> arch/arm/kernel/smp.c...) which use msecs_to_jiffies(5000), but other
> architectures use completely different timeouts.
I think msecs_to_jiffies(5000) is ok, we will test it on our bf561 board.
>
> Patch is against 3.19.0 (localversion-next is -next-20150210)
>
>  arch/blackfin/mach-common/smp.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c
> index 8ad3e90..8a05c32 100644
> --- a/arch/blackfin/mach-common/smp.c
> +++ b/arch/blackfin/mach-common/smp.c
> @@ -417,7 +417,7 @@ static DECLARE_COMPLETION(cpu_killed);
>
>  int __cpu_die(unsigned int cpu)
>  {
> -       return wait_for_completion_timeout(&cpu_killed, 5000);
> +       return wait_for_completion_timeout(&cpu_killed, msecs_to_jiffies(5000));
>  }
>
>  void cpu_die(void)
> --
> 1.7.10.4
>
-steven
--
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