Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1105057pxj; Fri, 11 Jun 2021 21:45:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrOH5GJl7NVHQK0aWxp1c1V8qazYw3oVA0Adhgcsam1aKuxA4vcxPXDy7IRpQmNo8Nzkx8 X-Received: by 2002:a17:906:488a:: with SMTP id v10mr6327897ejq.383.1623473154674; Fri, 11 Jun 2021 21:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623473154; cv=none; d=google.com; s=arc-20160816; b=SUi8jKj9S4Rs55VdFsFQHJcG+4O4S+uQzwK7n6dDb8iwozq77MMts83Rsb/+OJVrjs YjeHkMDlyr8W8LLT8ll9ZiDZZksuYXRaKDcJevG5uOMqVQrbvmuawSsOVh6l8WgxnX2S b1aMKgSIE8VknonGSk7bQZugWsMvhO3zP0lwwoDVZ0vIphrj82LJ0xURVZy/YYEslS5j oALbsJfE0Ix3hZprv14P8bmJSCnQe9kuNkCp9if1lT5qxLrbZKBEPGFzbnv2e2r1evcE VagFFmH1iU+w2wKfl09gF+7IrlRkn/HMHOzMePAbaO+znRW/VLrDiTLEooJRmwILv+tJ ApNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DkaEs5OoDbQVi5eWL76O0urBiumXEDrqwDT+nb75JPs=; b=f3Xlyp2NtutqIiSMQJB9DMirRTDOC91ZAWNCdLih6c0PDA3gDL+8aS3MhqeJUzwy2C 38zFqTrUAYGeVGXCprrRSLWJigIVoxATdHiW6FavAyQIlxX+6G2JK4gN/wR/h/0rFddl 18kZts+dmoN105UShEb6vuyeiuegxMtiv+a9Em8/Vn8mf9+hnMPNgpVfOwB0hG6sDf3B wkCtk4sg2b9LcSbt+qlo+VTCXS0gmbgHI4vuIMpKsFVPChh5rtHCQ/0RVQzFjujm0uKk leEEc57lqzQZaf35P17yM1YhPpSeb9ULPh/WIrAV4Skif1jjFxmnA2ahsAAicpKZyZZo ODFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=lesx5X2E; 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 bm24si6484125ejb.577.2021.06.11.21.45.19; Fri, 11 Jun 2021 21:45:54 -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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=lesx5X2E; 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 S229942AbhFLEov (ORCPT + 99 others); Sat, 12 Jun 2021 00:44:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbhFLEos (ORCPT ); Sat, 12 Jun 2021 00:44:48 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24674C061574 for ; Fri, 11 Jun 2021 21:42:37 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id o3so8063117wri.8 for ; Fri, 11 Jun 2021 21:42:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DkaEs5OoDbQVi5eWL76O0urBiumXEDrqwDT+nb75JPs=; b=lesx5X2EuoJQiu/wKMrxbfJEJQAUQ8l3Ut3kqbYeRNdAuzgf884npk+8H6F0NRrNYD itOveEVo6B+eROFErPspJrWleFoJDTFeu5z2YMnlIGzatz4IN5Uj/xkKrbtLHDWLgQ+A raG6jeLdt+g4eNZUGxGE48SGlSQlr6uwhkfXqM4vbQP1SCoWFyTtnfEAEJ7pXvoaaVYY MBAbjl9i0tw659eSxDXl0OfHT7otqxnK1fX5fbqPs1BI7BeB+mTaLZ7Vorz1uL09ikBr bAhJN/kCeI/oHxLBQscmWSkwojbgREtmOHhZFw+bhm8BStoRAxFfwrbVVUQhjM0crxUb PBhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DkaEs5OoDbQVi5eWL76O0urBiumXEDrqwDT+nb75JPs=; b=uRXAAUyNPPZMh/bbNNaLUs2WHSsb3KkkpoMSVHE9GPb7vUhbxHddBUG94yQBDRslt3 WO6eBx5x5NORUyskRkEqy0kvgo7J6caLjBovMBau8t/gRZPuuJumn/6SWf6T0jGt+QFn ED9QVS38e7ND2ERJ0t4NM8ZoWnxzORMWNkx69BOKYwTYnbEt4EWnNqrDB4MVDSC0mXnL TMaoxdp2DkoyPJ5iwPqWPJxHL30IUn3cfJ6Qfhrl8c95kp+Kj+Nb1fpB0QMymJ+2JWF/ ZMqKBQTWFLzraKTvh2NJjpUpS9l92r+8AJSMBt5Gluvl9YFdUiXbYjmpvN1nF5j0yWF4 CklQ== X-Gm-Message-State: AOAM532QE3MTv1CXxnipqzClWO1K9MTsZQxhSqcdsiQmaHqqarerQ3V7 jsWqqAnzlSNGLL5/eP973W+QWVjQNTj7rKyYrOMpbg== X-Received: by 2002:adf:efc3:: with SMTP id i3mr7189395wrp.356.1623472955642; Fri, 11 Jun 2021 21:42:35 -0700 (PDT) MIME-Version: 1.0 References: <20210612034042.3043112-1-palmer@dabbelt.com> In-Reply-To: <20210612034042.3043112-1-palmer@dabbelt.com> From: Anup Patel Date: Sat, 12 Jun 2021 10:12:24 +0530 Message-ID: Subject: Re: [PATCH] RISC-V: Use asm-generic for {in,out}{bwlq} To: Palmer Dabbelt Cc: linux-riscv , Paul Walmsley , Albert Ou , Atish Patra , "linux-kernel@vger.kernel.org List" , kernel-team@android.com, Palmer Dabbelt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 12, 2021 at 9:25 AM Palmer Dabbelt wrote: > > From: Palmer Dabbelt > > The asm-generic implementation is functionally identical to the RISC-V > version. > > Signed-off-by: Palmer Dabbelt Indeed, these are same as asm-generic. Reviewed-by: Anup Patel Regards, Anup > --- > 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 >