diff options
| -rw-r--r-- | arch/parisc/kernel/setup.c | 9 | ||||
| -rw-r--r-- | include/asm-parisc/pci.h | 23 |
2 files changed, 29 insertions, 3 deletions
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c index 40fc427b5d54..3379a08628e0 100644 --- a/arch/parisc/kernel/setup.c +++ b/arch/parisc/kernel/setup.c @@ -53,6 +53,15 @@ struct proc_dir_entry * proc_runway_root = NULL; struct proc_dir_entry * proc_gsc_root = NULL; struct proc_dir_entry * proc_mckinley_root = NULL; +#if !defined(CONFIG_PA20) && (defined(CONFIG_IOMMU_CCIO) || defined(CONFIG_IOMMU_SBA)) +int parisc_bus_is_phys = 1; /* Assume no IOMMU is present */ +EXPORT_SYMBOL(parisc_bus_is_phys); +#endif + +/* This sets the vmerge boundary and size, it's here because it has to + * be available on all platforms (zero means no-virtual merging) */ +unsigned long parisc_vmerge_boundary = 0; +unsigned long parisc_vmerge_max_size = 0; void __init setup_cmdline(char **cmdline_p) { diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h index fe7c7045dc4d..2ff788b016b4 100644 --- a/include/asm-parisc/pci.h +++ b/include/asm-parisc/pci.h @@ -106,11 +106,28 @@ static __inline__ int pci_is_lmmio(struct pci_hba_data *hba, unsigned long a) struct pci_bus; struct pci_dev; -/* The PCI address space does equal the physical memory - * address space. The networking and block device layers use +/* + * If the PCI device's view of memory is the same as the CPU's view of memory, + * PCI_DMA_BUS_IS_PHYS is true. The networking and block device layers use * this boolean for bounce buffer decisions. */ -#define PCI_DMA_BUS_IS_PHYS (1) +#ifdef CONFIG_PA20 +/* All PA-2.0 machines have an IOMMU. */ +#define PCI_DMA_BUS_IS_PHYS 0 +#define parisc_has_iommu() do { } while (0) +#else + +#if defined(CONFIG_IOMMU_CCIO) || defined(CONFIG_IOMMU_SBA) +extern int parisc_bus_is_phys; /* in arch/parisc/kernel/setup.c */ +#define PCI_DMA_BUS_IS_PHYS parisc_bus_is_phys +#define parisc_has_iommu() do { parisc_bus_is_phys = 0; } while (0) +#else +#define PCI_DMA_BUS_IS_PHYS 1 +#define parisc_has_iommu() do { } while (0) +#endif + +#endif /* !CONFIG_PA20 */ + /* ** Most PCI devices (eg Tulip, NCR720) also export the same registers |
