Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4205530imm; Tue, 25 Sep 2018 13:13:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV62yl08gksMLuLpWpqcbgq1x7WRZkzoHxIKx6Ymckyxb8Y38gkmCMYQOirf530zcFNyIa6Y7 X-Received: by 2002:a63:1245:: with SMTP id 5-v6mr2433158pgs.299.1537906410296; Tue, 25 Sep 2018 13:13:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537906410; cv=none; d=google.com; s=arc-20160816; b=UmQ+uGk0vHOaaIoRvQRN8ndAACE4/Ty4e/ygfcA8OC47eO0DFyovbEgcDb8mBEd+yQ fhEcduYv6ILxI91DvZ5mI6xGFWHspRKJmA1ee18/OXyO09KXyrzJX27WgQrAtd9EVbmx ppEBSsmci7nZwzHiOFhNkjjv7REQ/nTpmCB/tltjfAiYQIivnD+64bCDzFANCdKbyo+K 6odJ7VZt+fqo5vpaXlUcr5D9Erxy5ggnktbbC4CttrJe3+LUGBgbc4NIjG1byCWS5D0G zxXBEXBJiLGRSwiwZpSm04WpwuwjPBMQbe6Rx+0cl+eBzdj0YARKwQTbMDl31bQMmMDu KmdA== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=LiZhOqz7StL5Ja1ofBA4O+CSFGJDKQQ5BcXyQrpm6lg=; b=0soOLWM9MbX2UIk1HkvZKSeQkZ6sgY5vqCQiqy+6ulRvWXfGWAaQD596se8lhWbSmz Q1nRHtmgTl4cof5W+Uv9Nk8DgpAeHPqytNT/8t4sBxkBaOtkLNjzi+5aUAWznf3U1oXs qHqjKfHeZbyUiqE1ZrOnCWFJYpn9jNd9FPoMjTz6PpKt/lom5W9FlQIURz7+LQI8/FBl FPJuRSrglmchhE7QGFj1PUIXM1ZatHoluFF3UfRwc9+PST1ZyJuCgEA2vhP+E83e6qTl dh14Isp2XVmNHMUtfXzF5wfK3S/TTI6WdAWUTm4e2L328Yj55WBNQPe/JRWkuNlH4/3+ lXnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XuOmBHib; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16-v6si2890197pgj.611.2018.09.25.13.13.13; Tue, 25 Sep 2018 13:13:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XuOmBHib; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726436AbeIZCWL (ORCPT + 99 others); Tue, 25 Sep 2018 22:22:11 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55241 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726292AbeIZCWL (ORCPT ); Tue, 25 Sep 2018 22:22:11 -0400 Received: by mail-wm1-f68.google.com with SMTP id c14-v6so14744617wmb.4 for ; Tue, 25 Sep 2018 13:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=LiZhOqz7StL5Ja1ofBA4O+CSFGJDKQQ5BcXyQrpm6lg=; b=XuOmBHibBTCoPO3JBlnCGuET8ceYE2Qe8kriKUPWGsQx2CD8IKGFdu128pzlltfSVy 3qDVrNXjDIqEA7NKHTVJzsyVOM1gsjTRuQ2CPe+NhMvYD32KJyL6tSQhCzcG78as97JQ J82sxYDF29ugqSuFFNraczy7sNPAVQtQbD4faNsontp/Q/CymfALM1MgvFIQtsOxUjBs dkFqoaDMimV/oMnM9ckUdqKr3KktSONM/gF7+mJqeT1Wi6s8ClX0lUgn7/5B/wOoT21I jJBqUVrE72C4Wpvf6ERL/ofupV1RKUp5qAjjtJzdlp2NPAPCUhcTQHr4dhwk2Yodd6iR 1NpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=LiZhOqz7StL5Ja1ofBA4O+CSFGJDKQQ5BcXyQrpm6lg=; b=F+fjvybGJZB/ljdUJ988auOHcTVdm0a9P+CPr2f30jtr5uAOxk1ft+GsFGqdWq/FrA rPJATkrY5O2CQngoTHCSRMZ1Iuy5NjXddFlYb3b47S2BBY0EAVvhdQrmZ1OxoiE7oMk7 keoByvgkDxwHQWPmz/x6yTp7X9bVQMD8x3ERONDWmCiBnnQMNntz/dGiPkhtW+NKMoDE JWCdP00tWU66nC0MUFZycl4lRj9bnzvcLoqZx/hoWK8bl6NHp6rJps0uNP8LRAnOHLNj hGXlDJkdvIFpEJJcFuQYw7VK8rc/oD+Z4w2FcaKOH8sy1L2RgqloZG4FzM2GKU8Pm5Kc HFJw== X-Gm-Message-State: ABuFfojJiJPm4cVCZG5gQqKw4GbmPsWeqVCDsIDDVR4eM3iazV3iDuYB G6X42N8zsByxlI+Ioo+cl68= X-Received: by 2002:a1c:f210:: with SMTP id s16-v6mr2142887wmc.36.1537906376290; Tue, 25 Sep 2018 13:12:56 -0700 (PDT) Received: from laptop ([37.122.159.87]) by smtp.gmail.com with ESMTPSA id x16-v6sm1982387wro.84.2018.09.25.13.12.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Sep 2018 13:12:55 -0700 (PDT) Message-ID: Subject: Re: [PATCH 1/1] MIPS: Add new Kconfig variable to avoid unaligned access instructions From: Yasha Cherikovsky To: Paul Burton Cc: Ralf Baechle , James Hogan , "linux-mips@linux-mips.org" , "linux-kernel@vger.kernel.org" Date: Tue, 25 Sep 2018 23:12:53 +0300 In-Reply-To: <20180925195757.glglc6q3ghn3dhs5@pburton-laptop> References: <20180920170306.9157-1-yasha.che3@gmail.com> <20180920170306.9157-2-yasha.che3@gmail.com> <20180925174510.rg3j4lfmwvlecnqt@pburton-laptop> <20180925195757.glglc6q3ghn3dhs5@pburton-laptop> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-09-25 at 19:57 +0000, Paul Burton wrote: > Hi Yasha, > > On Tue, Sep 25, 2018 at 10:30:52PM +0300, Yasha Cherikovsky wrote: > > On Tue, 2018-09-25 at 17:45 +0000, Paul Burton wrote: > > > How about we: > > > > > > - Add a Kconfig option CONFIG_CPU_SUPPORTS_LOAD_STORE_LR, and > > > select > > > it for all existing pre-r6 targets (probably from CONFIG_CPU_*). > > > > > > - Change CONFIG_GENERIC_CSUM to default y if > > > !CONFIG_CPU_SUPPORTS_LOAD_STORE_LR, and drop the selects of it. > > > > > > That would avoid the double-negative ("if we don't not support this") > > > that the #ifndef's currently represent. It would also mean any future > > > architecture/ISA targets beyond MIPSr6 automatically avoid the > > > instructions. > > > > Thanks for your feedback, I'll start preparing v2. > > > > Looking in arch/mips/Kconfig, some CPU options start > > with CPU_SUPPORTS_ and some with CPU_HAS_. > > Which perfix should we use here? > > That's a good question :) > > To be honest I don't think either of them is perfect, since what we're > really describing is what's supported by the ISA that the kernel build > is targeting - and in theory the CPU we actually run on could support > extra things. > > But considering it I think CPU_HAS_ is probably the best choice for > this, since it's already used similarly to indicate support for pref & > sync instructions. > > Thanks, > Paul OK, Thanks.