Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2514285ybt; Sun, 21 Jun 2020 23:36:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa+CRMxDuuuAMrsWXI0nBbkbCAih+yat7imFs1G3wyy+XoHRFwalIFt98Z6Fh4dKYRQ+EL X-Received: by 2002:a05:6402:158d:: with SMTP id c13mr10650954edv.103.1592807760640; Sun, 21 Jun 2020 23:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592807760; cv=none; d=google.com; s=arc-20160816; b=ObMgXwXYvosB9Sshivb12RXffkK2lPeTmUZBzAdjGw3U8Edvfdod8lxG+HRUp7yNPe rpF7akKHfpU6s8wWOT3/NtzUROIRImwWxY6TFMAzrsqMDkf9P7p58mnqcLKfkxUGQqp/ DWIo45JNYctO9RCuRZRLUUq3GurncKWuXfNl0HwD6B8RtHGQfB2G3I/1kQY9yc577N+N Z52XQKSsGQLzxKvpw/kvnzcqbTz78QRoihrFijSKbiLmV/aMV+ceWu69KitqtH6EJfA/ S16/lbFhSR1TUHBCMhw8kHOEZG2agGMVH5H168sHLMoqTLF3bUy+6NFHp2zrvT08verF R30Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=p//jqJrWfVFOjyKLBt7xMkEyxWc/HLDv/7iZQ6ILA7c=; b=jeWD/RlLMQf/4w4TGhADhYVKRLLiWblGx9Epd9bt28nTRxp21gKNjWgWfe0llJ+unz tNQOYE3rq5qohe3AUl1YjmrgN8CCquco9JY0CVKkWAN2yWzb0cuX/uSkRtWe1a1ygtmX cnq5alR5xmg6llkBQrQGx6j05YW1hSuLEaqin64XFL/AqKceLWnebePLHHj/Qr8mTxG8 qhp74mfUTgZblhWR5reLB+wfIRhvFDOK34NlG+YCxrhoWcJTYefR0VBHcIhMEITgGqc+ v7m8CBehjAIWaq+e3cH+2pW1ruu/A/LQYeCNhg4WXvM0hzVCvwjcDSG5ovXERX3P3R6y tJTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=LBmdgW+u; 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 n1si7829565edq.483.2020.06.21.23.35.37; Sun, 21 Jun 2020 23:36:00 -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=@sifive.com header.s=google header.b=LBmdgW+u; 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 S1726767AbgFVGdz (ORCPT + 99 others); Mon, 22 Jun 2020 02:33:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726686AbgFVGdy (ORCPT ); Mon, 22 Jun 2020 02:33:54 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3637C061794 for ; Sun, 21 Jun 2020 23:33:54 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id b16so7942221pfi.13 for ; Sun, 21 Jun 2020 23:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=p//jqJrWfVFOjyKLBt7xMkEyxWc/HLDv/7iZQ6ILA7c=; b=LBmdgW+ucSprQgGnygP8exzcYQPyLeVoNNyYkgW1XJiOCJ2qG2CZyRabEFA5w5BzHj as5md9y9JZpPU7MFmiBberQoMbKPJIS1j+hFYdsIa1tth6Z0bJfjGvQvFDGVTOT6/dyH DuV2LPs8t6GG3vAGNbp1Di9e+6eYgV4wBaLYJO8xBrUb/kIJn0UJWm95+zpExLgvJ9Js 7MOhg5ftRVc5xNLZrvjilQTq5FrsTsraFDYNY7+zw4DOwcqkw8BnhpZI2FnLa2ZGvXY2 fcG09GNZ23lNPu/pZLsJkGSMIE/WQSWdQsO1IGBgdLloIGV4mNu/UpFJmP/OQoAmrfrE HW/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=p//jqJrWfVFOjyKLBt7xMkEyxWc/HLDv/7iZQ6ILA7c=; b=NIUJUDah830N8hkvaRUw1scLHpJa+6XH9/A+Y8JSCvaOnZ7rEDahhskL0PuH3F0qON OAnJ0trHcKFt0MSaSUk/MOnHKhwws4vPbV9yAwKRcYrFUsSMq6LUKWUagkwZ0gP8+HNl XJFL2db7XpDpaMJdYk+d6vAG0R9YvoIT8NNtCuBRGTbDwHVtYU2gLUTi6MeywuP5wRfv wpn8Z8k2RfZ309FZtVXjL2WtHkooyVSZ6O91btUubnvblgYOlgb63XE3Jy8TaU+T9NxH gvWX1S/9JSfjAZdzChKFbzA06MgXdx4/OCNzSXrJJ9ctqSbSPBPosu2ra0ZFuPQvmlMc fVzw== X-Gm-Message-State: AOAM530xlnGBv6HpqQZ+MZ9z95MXw7nGp2T1Yrgy8UWHdRaM/kcxlvcf d/9iS5jTR7+W9/3zXKsUNLFVEA== X-Received: by 2002:a63:1502:: with SMTP id v2mr11902989pgl.149.1592807634267; Sun, 21 Jun 2020 23:33:54 -0700 (PDT) Received: from hsinchu02.internal.sifive.com (114-34-229-221.HINET-IP.hinet.net. [114.34.229.221]) by smtp.gmail.com with ESMTPSA id w11sm12530999pfi.93.2020.06.21.23.33.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jun 2020 23:33:53 -0700 (PDT) From: Zong Li To: paul.walmsley@sifive.com, palmer@dabbelt.com, mick@ics.forth.gr, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Zong Li Subject: [PATCH v2 0/2] Add STRICT_DEVMEM support on RISC-V Date: Mon, 22 Jun 2020 14:33:48 +0800 Message-Id: X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set adds devmem_is_allowed to support STRICT_DEVMEM. In devmem_is_allowed, it invokes page_is_ram to check the specific address whether registered as System RAM in iomem_resource. The resource initialization is in kexec/kdump patch series which is reviewing, page_is_ram checking is no use until it is merged. Zong Li (2): riscv: Support CONFIG_STRICT_DEVMEM riscv: mm: refine the Makefile arch/riscv/Kconfig | 1 + arch/riscv/include/asm/io.h | 2 ++ arch/riscv/mm/Makefile | 5 +---- arch/riscv/mm/mmap.c | 24 ++++++++++++++++++++++++ 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 arch/riscv/mm/mmap.c -- 2.27.0