cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

iomap.c (650B)


      1// SPDX-License-Identifier: GPL-2.0
      2/*
      3 * ppc64 "iomap" interface implementation.
      4 *
      5 * (C) Copyright 2004 Linus Torvalds
      6 */
      7#include <linux/pci.h>
      8#include <linux/mm.h>
      9#include <linux/export.h>
     10#include <asm/io.h>
     11#include <asm/pci-bridge.h>
     12#include <asm/isa-bridge.h>
     13
     14void __iomem *ioport_map(unsigned long port, unsigned int len)
     15{
     16	return (void __iomem *) (port + _IO_BASE);
     17}
     18EXPORT_SYMBOL(ioport_map);
     19
     20#ifdef CONFIG_PCI
     21void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
     22{
     23	if (isa_vaddr_is_ioport(addr))
     24		return;
     25	if (pcibios_vaddr_is_ioport(addr))
     26		return;
     27	iounmap(addr);
     28}
     29
     30EXPORT_SYMBOL(pci_iounmap);
     31#endif /* CONFIG_PCI */