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]
Date:	Thu, 21 May 2009 17:15:28 +0100
From:	Ian Campbell <ian.campbell@...rix.com>
To:	ian.campbell@...rix.com
Cc:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Becky Bruce <beckyb@...nel.crashing.org>,
	Olaf Kirch <okir@...e.de>, Ingo Molnar <mingo@...e.hu>,
	Greg KH <gregkh@...e.de>,
	xen-devel <xendevel@...ts.xensource.com>,
	x86 maintainers <x86@...nel.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] swiotlb/xen: update xen swiotlb for phys<->bus API changes

These functions are now implemented via explicit hooks in
arch/x86/kernel/pci-swiotlb.c rather than as weak hooks in swiotlb.c

Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
Cc: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Cc: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: Becky Bruce <beckyb@...nel.crashing.org>
Cc: Olaf Kirch <okir@...e.de>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Greg KH <gregkh@...e.de>
Cc: xen-devel <xendevel@...ts.xensource.com>
Cc: x86 maintainers <x86@...nel.org>
Cc: lkml <linux-kernel@...r.kernel.org>
---
 drivers/pci/xen-iommu.c |    6 ++++--
 include/xen/swiotlb.h   |    3 ---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/xen-iommu.c b/drivers/pci/xen-iommu.c
index 2d727d1..02de48a 100644
--- a/drivers/pci/xen-iommu.c
+++ b/drivers/pci/xen-iommu.c
@@ -72,12 +72,12 @@ int xen_wants_swiotlb(void)
 	return xen_initial_domain();
 }
 
-dma_addr_t xen_phys_to_bus(phys_addr_t paddr)
+static dma_addr_t xen_phys_to_bus(struct device *hwdev, phys_addr_t paddr)
 {
 	return phys_to_machine(XPADDR(paddr)).maddr;
 }
 
-phys_addr_t xen_bus_to_phys(dma_addr_t daddr)
+static phys_addr_t xen_bus_to_phys(struct device *hwdev, dma_addr_t daddr)
 {
 	return machine_to_phys(XMADDR(daddr)).paddr;
 }
@@ -322,6 +322,8 @@ void __init detect_xen_iommu(void)
 
 	x86_swiotlb_force_mapping = &xen_swiotlb_force_mapping;
 	x86_swiotlb_alloc_fixup = &xen_swiotlb_alloc_fixup;
+	x86_bus_to_phys = &xen_bus_to_phys;
+	x86_phys_to_bus = &xen_phys_to_bus;
 }
 
 void __init xen_iommu_init(void)
diff --git a/include/xen/swiotlb.h b/include/xen/swiotlb.h
index 83ec002..e6c7707 100644
--- a/include/xen/swiotlb.h
+++ b/include/xen/swiotlb.h
@@ -1,9 +1,6 @@
 #ifndef _XEN_SWIOTLB_H
 #define _XEN_SWIOTLB_H
 
-extern phys_addr_t xen_bus_to_phys(dma_addr_t daddr);
-extern dma_addr_t xen_phys_to_bus(phys_addr_t paddr);
-
 #ifdef CONFIG_PCI_XEN
 extern int xen_wants_swiotlb(void);
 #else
-- 
1.5.6.5

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