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: <20081222140824U.fujita.tomonori@lab.ntt.co.jp>
Date:	Mon, 22 Dec 2008 14:34:54 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	jeremy@...p.org
Cc:	mingo@...e.hu, linux-kernel@...r.kernel.org,
	xen-devel@...ts.xensource.com, x86@...nel.org,
	ian.campbell@...rix.com, jbeulich@...ell.com,
	fujita.tomonori@....ntt.co.jp
Subject: Re: [PATCH 07 of 14] swiotlb: add arch hook to force mapping

On Tue, 16 Dec 2008 12:17:31 -0800
Jeremy Fitzhardinge <jeremy@...p.org> wrote:

> From: Ian Campbell <ian.campbell@...rix.com>
> 
> Some architectures require special rules to determine whether a range
> needs mapping or not.  This adds a weak function for architectures to
> override.
> 
> Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
> ---
>  include/linux/swiotlb.h |    2 ++
>  lib/swiotlb.c           |   15 +++++++++++++--
>  2 files changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
> --- a/include/linux/swiotlb.h
> +++ b/include/linux/swiotlb.h
> @@ -30,6 +30,8 @@
>  extern dma_addr_t swiotlb_phys_to_bus(phys_addr_t address);
>  extern phys_addr_t swiotlb_bus_to_phys(dma_addr_t address);
>  
> +extern int swiotlb_arch_range_needs_mapping(void *ptr, size_t size);
> +
>  extern void
>  *swiotlb_alloc_coherent(struct device *hwdev, size_t size,
>  			dma_addr_t *dma_handle, gfp_t flags);
> diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> --- a/lib/swiotlb.c
> +++ b/lib/swiotlb.c
> @@ -145,6 +145,11 @@
>  	return phys_to_virt(swiotlb_bus_to_phys(address));
>  }
>  
> +int __weak swiotlb_arch_range_needs_mapping(void *ptr, size_t size)
> +{
> +	return 0;
> +}

Can't you simply make address_needs_mapping __weak as Becky does?
--
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