Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1084731pxj; Fri, 11 Jun 2021 21:00:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsFLsMvLAlv9e/dpKMuH/2jbh20GXVtRsxa2wWMy4ZLpSwJFpcI+sKugWNudqLPp0AnlH/ X-Received: by 2002:a05:6402:695:: with SMTP id f21mr6648912edy.96.1623470444503; Fri, 11 Jun 2021 21:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623470444; cv=none; d=google.com; s=arc-20160816; b=POixXpQV8YfQ3xn/QGztLfj9kdCri6RQaJuQbDgcaWB0hxl8wfxyYS3ddCQLa8wEFI UdDMBpJvBzU84qBDY4sNKr5jY5p80FpjPDiD/4nl8Vy0Xa85sXyl+QHxj1oEg8ohE5Ft uCoYpKo7nJuhKcI6oIXnctMMdreaabuc4rIT2Riw7Vn8u/BtfJQGQrFa/OpNdWCCQz4T JbQnYv6FT+l1esGUrsAydNCVBPizQ3uUKSDyGLCDSY9e6wbvmgJw0mXQVGY54+2gxqo3 uTxMFnWOTbFeyTQMsdM5YiiPsxmFi17QUKRLsE9LiSOWJLlG2923+kOI0ZRUKX3wub8o Il5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:cc:content-transfer-encoding :mime-version:message-id:date:subject:dkim-signature; bh=akFvGOTPnrH1oZbsyh18q4gwMkUtme+zCkp52VPSqZw=; b=ghE+9KuJJW8JC6vFKVboEU1lXOZFyXdu2cnRuQ8ZTS5MVeTCyQ85qfmIDr3Nd7kzqB intnyJESQ6ILWHk4xYgQAJ/hQOmlnCCv3UmCdAIwL7WsI8I4dBUBtdn2Mha3zC6qHkMu fZHBNAoskouR3/7NnNoI0lRzNYWMkegba409lp6/OSfJk66nDYJUiolFu17C9oqGKa0W UVN6ZMZ42qh9lGfHEMYBWmxps7cbUcnZfKKU5EAYIey2s3wmSorVoG2nDKOoMUcFf2XU J68RJ1d0gJ9wPESp1ZCHGa4AcyTlfl2EzRi6gEZPjQ3qFejRzDwEueOorGvmAebdbMb4 jPKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=nBGjkv2i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l18si2522595edr.482.2021.06.11.21.00.09; Fri, 11 Jun 2021 21:00:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=nBGjkv2i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230444AbhFLD7B (ORCPT + 99 others); Fri, 11 Jun 2021 23:59:01 -0400 Received: from mail-pl1-f181.google.com ([209.85.214.181]:39532 "EHLO mail-pl1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230400AbhFLD67 (ORCPT ); Fri, 11 Jun 2021 23:58:59 -0400 Received: by mail-pl1-f181.google.com with SMTP id v11so3791166ply.6 for ; Fri, 11 Jun 2021 20:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=subject:date:message-id:mime-version:content-transfer-encoding:cc :from:to; bh=akFvGOTPnrH1oZbsyh18q4gwMkUtme+zCkp52VPSqZw=; b=nBGjkv2isftJYT3Ts0j5r4K/CnN+xKidSd7pfDQQJCzMD3XlOfO6P0+4/GHxz/yglN NWB3/Mov8sTCoyyQ4qTppoJz6kq8qvMEA02boa60uTbhvlM8YkTRD6PJ3J9ijsoYEjRf TDfUyIdyzKt6vJfuTebGdQcvZA1reXv1ITiz8h/OpIvXD8SxFIlvF3onezT0lcBYRTbP M2g/v2pdTjekPqLlUxJpRo6KnOhViFQ23BuPHiiiRvhARR1PI6IWys66tWhxbWAd8339 NCBCKLyUMJoJESoRgRoBYW89orPXZgwBV/5Dvhw8pW4L1pdQ7NBxH38rZL+CurvkYpFA 0lEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:mime-version :content-transfer-encoding:cc:from:to; bh=akFvGOTPnrH1oZbsyh18q4gwMkUtme+zCkp52VPSqZw=; b=i1MM9tOo0rSgSu0dkquYYkFcwkKMv2Q11Kyq8OuJPbhCDaBbjk8/sCXt41bgHFImgg XUOsU7vGaonWdmsH+f0oHjbk4iz9eG1GU60/w5pND3ZPRfwGkwdSpOiG7Ynx2mafrT7U nNk7vES1MjGxxnKvQpy7pfuPgQ1/mt42toDqT6wmds3t+Ic/xrwembhA3Bz8Zhh5fr9E 7wDVyvzDiYJslKSGAALTmojE0kMCzsJ1MKty5hZGzvXTlXMpIO4a2Mq2Aw6l0aytRWRO XvZC+1SwUw3zPp3UrA9zrQRrIIliIoPHIXwFHBZQjPBNR1dn8Erx7yrp3Y4de1XP/alx XlOA== X-Gm-Message-State: AOAM530mWAXrFYAx6Dx/ptd7xU9n3Q/4U2QmzvARnWjCSEf9JtOlX4M5 gaJ8d0mDuzmoe3WHCJLqZ/uNxA== X-Received: by 2002:a17:90a:f3d0:: with SMTP id ha16mr7721767pjb.123.1623470144207; Fri, 11 Jun 2021 20:55:44 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id bg16sm684308pjb.16.2021.06.11.20.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 20:55:43 -0700 (PDT) Subject: [PATCH] RISC-V: Use asm-generic for {in,out}{bwlq} Date: Fri, 11 Jun 2021 20:40:42 -0700 Message-Id: <20210612034042.3043112-1-palmer@dabbelt.com> X-Mailer: git-send-email 2.32.0.272.g935e593368-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Paul Walmsley , Palmer Dabbelt , aou@eecs.berkeley.edu, anup@brainfault.org, Atish Patra , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com, Palmer Dabbelt From: Palmer Dabbelt To: linux-riscv@lists.infradead.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Palmer Dabbelt The asm-generic implementation is functionally identical to the RISC-V version. Signed-off-by: Palmer Dabbelt --- arch/riscv/include/asm/io.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/arch/riscv/include/asm/io.h b/arch/riscv/include/asm/io.h index c025a746a148..69605a474270 100644 --- a/arch/riscv/include/asm/io.h +++ b/arch/riscv/include/asm/io.h @@ -52,19 +52,6 @@ #define __io_pbw() __asm__ __volatile__ ("fence iow,o" : : : "memory"); #define __io_paw() __asm__ __volatile__ ("fence o,io" : : : "memory"); -#define inb(c) ({ u8 __v; __io_pbr(); __v = readb_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; }) -#define inw(c) ({ u16 __v; __io_pbr(); __v = readw_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; }) -#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; }) - -#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); }) -#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); }) -#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); }) - -#ifdef CONFIG_64BIT -#define inq(c) ({ u64 __v; __io_pbr(); __v = readq_cpu((void*)(c)); __io_par(__v); __v; }) -#define outq(v,c) ({ __io_pbw(); writeq_cpu((v),(void*)(c)); __io_paw(); }) -#endif - /* * Accesses from a single hart to a single I/O address must be ordered. This * allows us to use the raw read macros, but we still need to fence before and -- 2.32.0.272.g935e593368-goog