mirror of
https://github.com/torvalds/linux.git
synced 2024-12-18 09:02:17 +00:00
688ba1dbee
Remove the dependency on PCI initialization for SWIOTLB initialization. So that PCI can be initialized at proper time. SWIOTLB is partly determined by PCI inbound/outbound map which is assigned in PCI initialization. But swiotlb_init() should be done at the stage of mem_init() which is much earlier than PCI initialization. So we reserve the memory for SWIOTLB first and free it if not necessary. All boards are converted to fit this change. Signed-off-by: Jia Hongtao <B38951@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> Acked-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
32 lines
804 B
C
32 lines
804 B
C
/*
|
|
* Copyright (C) 2009 Becky Bruce, Freescale Semiconductor
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
* option) any later version.
|
|
*
|
|
*/
|
|
|
|
#ifndef __ASM_SWIOTLB_H
|
|
#define __ASM_SWIOTLB_H
|
|
|
|
#include <linux/swiotlb.h>
|
|
|
|
extern struct dma_map_ops swiotlb_dma_ops;
|
|
|
|
static inline void dma_mark_clean(void *addr, size_t size) {}
|
|
|
|
extern unsigned int ppc_swiotlb_enable;
|
|
int __init swiotlb_setup_bus_notifier(void);
|
|
|
|
extern void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev);
|
|
|
|
#ifdef CONFIG_SWIOTLB
|
|
void swiotlb_detect_4g(void);
|
|
#else
|
|
static inline void swiotlb_detect_4g(void) {}
|
|
#endif
|
|
|
|
#endif /* __ASM_SWIOTLB_H */
|