Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1450410pxb; Thu, 16 Sep 2021 07:46:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzir3R2iZ67GybDFHc4f2xQIDbR4nSFrOZwW1XqsMrXrAdTP7f0PEfhTKMpSCEjjMY7FjhI X-Received: by 2002:a05:6402:430f:: with SMTP id m15mr6862111edc.115.1631803576177; Thu, 16 Sep 2021 07:46:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631803576; cv=none; d=google.com; s=arc-20160816; b=xEc3gLNAEJUYZTdaVbEQR/LOgjEaH5qb1HyqjWkuFY9nOG6yIbNdnXCrADws8tV3mF 3J9zEDeGaSyvB3I54p0DW6VJsMa+KQx/1Vc44JBKVKnIkHlQFgXqugqyoDgnjGFkZdb3 Wlt5NR+fTNOTa6fS7EfHYjdg8yK4l1JiufiW+FmrPgLAWBKtVle0JaWCR8fZGug9zoQW r7LL2LOD8jW66yJVzoUNzFTf3MDDMali+IOnXrDYFsAQkK09k+B+SoSHFLZ4RNm+VUYA rnPlswhOt8adlrpCJZZ5SeqF9eG4/hhrM3Jlr/EL2wV0L5AkUoau3dTiCVoqsOqKlNlD xl5w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2uwNcE35PEQAI7Z4of2mWmqh6Aeyn8LrcWnA5/cVgTY=; b=dP+02yEo3IcB90LUcuBbi5nrJjDXoCEY6Gb20u/wOPSJKtquXU8IL+DsnbmbiHEloV 9bsq7AZP/qeyiDAXKHmFcNhV/WS7WbWRGFjxa/NwjV9k2ltP5iMnyyjr6JJP4yDYyFo7 7Wk3/v4npsjlE+gXL9XM3pBrsNog4IjpNdP3BF+UPgyzQmc1OOwzCYTZTavFUbvcel3k wT0H5XOQG8KC/jX1LuDs1GHUDTkEehUhsTVQ+aLbhwKc6LrDhu9XAa1wJSVKqA1g4jwd xAipnRh9Rxh8wpZFaQgYlvgcFb2v2Z9pV067v7Uk4PRivssC2+cGHUhWcppgXph6AGD3 PfJg== 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 bo24si3696148edb.275.2021.09.16.07.45.42; Thu, 16 Sep 2021 07:46:16 -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 S239848AbhIPNBm (ORCPT + 99 others); Thu, 16 Sep 2021 09:01:42 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:16267 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239824AbhIPNBk (ORCPT ); Thu, 16 Sep 2021 09:01:40 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4H9HH02GFrz8tCG; Thu, 16 Sep 2021 20:59:40 +0800 (CST) Received: from dggema756-chm.china.huawei.com (10.1.198.198) by dggemv711-chm.china.huawei.com (10.1.198.66) 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:18 +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:18 +0800 From: Chen Huang To: Paul Walmsley , Palmer Dabbelt , Albert Ou CC: Chen Huang , Kefeng Wang , Darius Rad , Jisheng Zhang , , Subject: [PATCH v2 1/2] riscv: support HAVE_EFFICIENT_UNALIGNED_ACCESS Date: Thu, 16 Sep 2021 13:08:54 +0000 Message-ID: <20210916130855.4054926-2-chenhuang5@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210916130855.4054926-1-chenhuang5@huawei.com> References: <20210916130855.4054926-1-chenhuang5@huawei.com> 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 This patch selects HAVE_EFFICIENT_UNALIGNED_ACCESS. But the feature maybe not be implemented on some CPUs, or with inefficent implementation. So add a config CPU_HAS_NO_UNALIGNED, if the CPU don't want it, please select it. Signed-off-by: Chen Huang Signed-off-by: Kefeng Wang --- arch/riscv/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index aac669a6c3d8..cd0be39d4c08 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -81,6 +81,7 @@ config RISCV select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS if MMU select HAVE_EBPF_JIT if MMU + select HAVE_EFFICIENT_UNALIGNED_ACCESS if !CPU_HAS_NO_UNALIGNED && MMU select HAVE_FUNCTION_ERROR_INJECTION select HAVE_FUTEX_CMPXCHG if FUTEX select HAVE_GCC_PLUGINS @@ -382,6 +383,9 @@ config FPU If you don't know what to do here, say Y. +config CPU_HAS_NO_UNALIGNED + bool + endmenu menu "Kernel features" -- 2.25.1