Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1361248pxb; Thu, 16 Sep 2021 06:02:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxb2UiFDg0VQ7jR4IkBiGdC4Pta098A/9QHolbSh8xCkFoNbfErWwEwULXNdAWqfeJAciEL X-Received: by 2002:a6b:7519:: with SMTP id l25mr4174021ioh.169.1631797350970; Thu, 16 Sep 2021 06:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631797350; cv=none; d=google.com; s=arc-20160816; b=tjzNIJE750HS0Zx5tRXtSh231xSPzjxakY/VdJLQVfpZy/0K/F4eT3al57wt+kHWw0 g4tBMaCWIE3CxXalPmMGOhXDoMdvR6lT/3ZI/lT9vaWgxJtJ38fZaLq3y50pRWsxb8KC i32h6+gGM7ZHq+BhL7rgP+DHnp3ynzYC8vy1neWknqRbV2UXgZXaKC5kmo7OndxaMNWg WunN5ai46UsdGw4wOvoIDPwT7PpMphpIjeGNQUsZv0HtrwuqOtXFA4Ur6SX3XjUOE+/s 3zZIbpkUb5dCR9xHACSnxfcbvPmk4kZNd3PgNTVRzL1WgeMpaxwiPT5hZ6GwvKP7Ota9 zdQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=DCskiUgi0KPZL0ZyCA4ajI+CTGNAkYaj5+WxRuES6OI=; b=cayYiiV8qnnvclYUvikP8pf5ggcvBykhsxmrBNQaCauGmDFsH6B/6++PVfJy9D7n4/ skhkdleuDTRWkA0nCSZzrNmqKPG+z3EhXatVjQMQeqoRQKc0MiFCwjf/fdudGnUexTbU /yMdMhMqjX3JDXQHSv1sw//611z+03V9OJM2nJ9Bq+fv11BUCkl9igiXl+nwLHhRSRC2 hjhARb5MpKLw/hm4ucJkEO6SGWd5D9RwLdOUm9RHkHKC1Cj4FO1pT9Zj0qg0CqafmQfO pJy59CtU2bkeYIc9uFXuAKNWzDD86auHKN0+7vFmRBv8xD1WaNRfQatt8/sN/5RdXD/w LIuw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k39si3095657jav.88.2021.09.16.06.02.18; Thu, 16 Sep 2021 06:02:30 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239809AbhIPNBi (ORCPT + 99 others); Thu, 16 Sep 2021 09:01:38 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:9886 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239741AbhIPNBi (ORCPT ); Thu, 16 Sep 2021 09:01:38 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4H9HBX3jRxz8yXQ; Thu, 16 Sep 2021 20:55:48 +0800 (CST) Received: from dggema756-chm.china.huawei.com (10.1.198.198) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.8; Thu, 16 Sep 2021 21:00:15 +0800 Received: from localhost.localdomain (10.175.112.125) by dggema756-chm.china.huawei.com (10.1.198.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Thu, 16 Sep 2021 21:00:15 +0800 From: Chen Huang To: Paul Walmsley , Palmer Dabbelt , Albert Ou CC: Chen Huang , Kefeng Wang , Darius Rad , Jisheng Zhang , , Subject: [PATCH v2 0/2] riscv: improve unaligned memory accesses Date: Thu, 16 Sep 2021 13:08:53 +0000 Message-ID: <20210916130855.4054926-1-chenhuang5@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggema756-chm.china.huawei.com (10.1.198.198) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patchset improves RISCV unaligned memory accesses, selects HAVE_EFFICIENT_UNALIGNED_ACCESS if CPU_HAS_NO_UNALIGNED not enabled and supports DCACHE_WORD_ACCESS to improve the efficiency of unaligned memory accesses. If CPU don't support unaligned memory accesses for now, please select CONFIG_CPU_HAS_NO_UNALIGNED. For I don't know which CPU don't support unaligned memory accesses, I don't choose the CONFIG for them. Changes since v1: - As Darius Rad and Jisheng Zhang mentioned, some CPUs don't support unaligned memory accesses, add an option for CPUs to choose it or not. Chen Huang (2): riscv: support HAVE_EFFICIENT_UNALIGNED_ACCESS riscv: Support DCACHE_WORD_ACCESS arch/riscv/Kconfig | 5 ++++ arch/riscv/include/asm/word-at-a-time.h | 37 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+) -- 2.25.1