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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C9CCD1B.506@mvista.com>
Date:	Fri, 24 Sep 2010 20:08:59 +0400
From:	Sergei Shtylyov <sshtylyov@...sta.com>
To:	David Daney <ddaney@...iumnetworks.com>
CC:	linux-mips@...ux-mips.org, ralf@...ux-mips.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/9] MIPS: Add a platform hook for swiotlb setup.

Hello.

David Daney wrote:

> This allows platforms that are using the swiotlb to initialize it.

> Signed-off-by: David Daney <ddaney@...iumnetworks.com>
> ---
>  arch/mips/include/asm/bootinfo.h |    5 +++++
>  arch/mips/kernel/setup.c         |    5 +++++
>  2 files changed, 10 insertions(+), 0 deletions(-)

> diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h
> index 15a8ef0..b3cf989 100644
> --- a/arch/mips/include/asm/bootinfo.h
> +++ b/arch/mips/include/asm/bootinfo.h
> @@ -125,4 +125,9 @@ extern unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3;
>   */
>  extern void plat_mem_setup(void);
>  
> +/*
> + * Optional platform hook to call swiotlb_setup().
> + */
> +extern void plat_swiotlb_setup(void);
> +
>  #endif /* _ASM_BOOTINFO_H */
> diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
> index 85aef3f..8b650da 100644
> --- a/arch/mips/kernel/setup.c
> +++ b/arch/mips/kernel/setup.c
> @@ -488,6 +488,11 @@ static void __init arch_mem_init(char **cmdline_p)
>  
>  	bootmem_init();
>  	sparse_init();
> +
> +#ifdef CONFIG_SWIOTLB
> +	plat_swiotlb_setup();
> +#endif

    We should avoid #ifdef's in function bodies. Why not defile an empty 
'inline' in the header above if CONFIG_SWIOTLB is not defined?

WBR, Sergei

--
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