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

ide.h (1076B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2/*
      3 *  linux/include/asm-parisc/ide.h
      4 *
      5 *  Copyright (C) 1994-1996  Linus Torvalds & authors
      6 */
      7
      8/*
      9 *  This file contains the PARISC architecture specific IDE code.
     10 */
     11
     12#ifndef __ASM_PARISC_IDE_H
     13#define __ASM_PARISC_IDE_H
     14
     15/* Generic I/O and MEMIO string operations.  */
     16
     17#define __ide_insw	insw
     18#define __ide_insl	insl
     19#define __ide_outsw	outsw
     20#define __ide_outsl	outsl
     21
     22static __inline__ void __ide_mm_insw(void __iomem *port, void *addr, u32 count)
     23{
     24	while (count--) {
     25		*(u16 *)addr = __raw_readw(port);
     26		addr += 2;
     27	}
     28}
     29
     30static __inline__ void __ide_mm_insl(void __iomem *port, void *addr, u32 count)
     31{
     32	while (count--) {
     33		*(u32 *)addr = __raw_readl(port);
     34		addr += 4;
     35	}
     36}
     37
     38static __inline__ void __ide_mm_outsw(void __iomem *port, void *addr, u32 count)
     39{
     40	while (count--) {
     41		__raw_writew(*(u16 *)addr, port);
     42		addr += 2;
     43	}
     44}
     45
     46static __inline__ void __ide_mm_outsl(void __iomem *port, void *addr, u32 count)
     47{
     48	while (count--) {
     49		__raw_writel(*(u32 *)addr, port);
     50		addr += 4;
     51	}
     52}
     53
     54#endif /* __ASM_PARISC_IDE_H */