Received: by 10.223.176.5 with SMTP id f5csp4365871wra; Tue, 30 Jan 2018 06:19:34 -0800 (PST) X-Google-Smtp-Source: AH8x224xIYDTT5KY3rPKrBh+tF2snEPnJGythIRZqYizcpVknHVrBCgBjF5fuwvA4YzYxV7JdLpU X-Received: by 10.98.80.20 with SMTP id e20mr30266743pfb.148.1517321974831; Tue, 30 Jan 2018 06:19:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517321974; cv=none; d=google.com; s=arc-20160816; b=dEZ30+rn7twd3qvlc6T+L9kA82GQ01RXERzBVQ5KBuxhmV9vzGix1Gpeco3Bqvczib DS+WCYL8nv0iASoYk0F0emQCzgbNkJ1kjSnAAa8SZMhDSUDRLjdTbSA7OIS4b+stv+aj KvRf74M9BYueRDuLcXbXTtkXZFegyeoIhZ8x2sSuEgnlkhp1XIZAauPQvfXj9dTIzipK x6G11vaBPcUZYa74EghwcrzqrXO+wkHtyAhnVkGrwOgB3CgE/PzFKkX/tYDuE6LQt+jm LARGOZb9kBJJzjnqfkquRPUU0dgkjDaLn4jvGq717lyg/RIx0KlbG+9NUKthJCU1VC7x b6aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=5eFTxfIBp8kQcXOIrfU6Ha96g+fgdFm/TWYIDOLQoDw=; b=m9L9prkVubhcNvVtbxgyUUMrytwxuj5yZMvfGzzBTwDmmhwRrL7lpLDPsOiJ22vFno Lt0Yet+sROw71//GFtfgxBiuE4m1P1HPfD4V4wR1WvIbqHgE8Kt/tG0FpBn3gytPiWPN VUaol/b0V7s4XVYMVshZls92CZP1r96OFrx/lJOO9avWzBZhFBReeA36aOkCp3xMOXNe pwEPKb9OzU2lL+Kri4TVh1xJ0w4YmSVSuTJS9G2vpgbXVCG1cfCJSEZjB+XqNzC0ihWX jy2cZ+KdVWS2L47uqWKXfsAgkH+dDsbSvzgl2rcQ6An+d/VINhgucQ8cRGWvcR/sYCEX n9TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=GMWtNasX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11-v6si7081113plr.671.2018.01.30.06.19.18; Tue, 30 Jan 2018 06:19:34 -0800 (PST) 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=fail header.i=@gmail.com header.s=20161025 header.b=GMWtNasX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752212AbeA3NdJ (ORCPT + 99 others); Tue, 30 Jan 2018 08:33:09 -0500 Received: from mail-oi0-f67.google.com ([209.85.218.67]:40851 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727AbeA3NdF (ORCPT ); Tue, 30 Jan 2018 08:33:05 -0500 Received: by mail-oi0-f67.google.com with SMTP id a184so7778363oif.7; Tue, 30 Jan 2018 05:33:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5eFTxfIBp8kQcXOIrfU6Ha96g+fgdFm/TWYIDOLQoDw=; b=GMWtNasXBLGroZ1TRJIqGFva8lQ7HRnZ2Bf+w4yK/tMGrj9TsQv0N8CN6Dolbjhvex Sexr4yp41mtbBIPbrCZNGJ+5v6R9zlNcTBziou3kOBmK4KkgdFIQGB8uZE7WtH5dRDKB csjVe7dbUmSpIrU8l3y3iqrPBU5cTvx4ZBoczEx4JBbBF2mmBpQUPj635es4JkcuPUHS OU2AUxAyQzurtElFz30qjl/dsqQDT/HDod4s0pVUDZC0iRay5jiR8mAfQC8ZHB0blKMk zJsPJELbciFGPqZULRIm++tm1UQteMhXZzuhOu6aBo2sPf+WwtLngz/M8HQa2riviO7l GW0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=5eFTxfIBp8kQcXOIrfU6Ha96g+fgdFm/TWYIDOLQoDw=; b=H+ps8BqWMF56K+TaEwOrGv8ZMP68rLFORAhMC693dMQnJIFUkAKDi6ju27u4eJb65t AwpOQJMOcd+GKfiRAhZZzXE+S56kepKKySu6zLgqXxceduKngk3kRDjavJbzO89ruH5q 3V5qyy0LindMd6gdExuTsr5Su08k2/0qp2rP7uiTbOKWTWSdR/o1javMYx2Q+XU+Xb4q +FmKmCpygtprpmlx0lDWFza7/3zMGFSLoEYF82zDbidyFE21a+MVc/NeM7bMP+SwYV76 IBdF82VxHrJugxH5S1M2frcyMEZkHRKrXefeYj+Ab2AC/wV8EjrpiSb3D2W72t046z0M eQdQ== X-Gm-Message-State: AKwxytdrO9UnIYkK9dtrFGIvVbowNuRzFkHymn9B9mtvTO2oIsAhrRjF hMgGxDrBSEQSkpOP6crxdGhhdh+sDfPhbcmY3d0= X-Received: by 10.202.86.12 with SMTP id k12mr9415890oib.283.1517319184124; Tue, 30 Jan 2018 05:33:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.68.33 with HTTP; Tue, 30 Jan 2018 05:33:03 -0800 (PST) In-Reply-To: References: <28c2c9da4da4c8b07473e97cd4a6cb953f4b507c.1515766253.git.green.hu@gmail.com> From: Arnd Bergmann Date: Tue, 30 Jan 2018 14:33:03 +0100 X-Google-Sender-Auth: 8cJ3tdEVtdxSNtu_nefnx1yhiho Message-ID: Subject: Re: [PATCH v6 07/36] nds32: Exception handling To: Vincent Chen Cc: Greentime Hu , Greentime , Linux Kernel Mailing List , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Networking , DTML , Al Viro , David Howells , Will Deacon , Daniel Lezcano , linux-serial@vger.kernel.org, Geert Uytterhoeven , Linus Walleij , Mark Rutland , Greg KH , Guo Ren , Randy Dunlap , David Miller , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Vincent Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 30, 2018 at 11:01 AM, Vincent Chen wrote: > 2018-01-24 19:10 GMT+08:00 Arnd Bergmann : >> On Wed, Jan 24, 2018 at 12:09 PM, Arnd Bergmann wrote: >>> On Wed, Jan 24, 2018 at 11:53 AM, Vincent Chen wrote: >>>> 2018-01-18 18:14 GMT+08:00 Arnd Bergmann : >> >>> Ok. I still wonder about the kernel part of this though: is it a good idea >>> for user space to configure whether the kernel does unaligned >>> accesses? I would think that the kernel should just be fixed in such >>> a case. >> >> To clarify: I'm asking only about unaligned accesses from kernel code itself, >> which is generally considered a bug when >> CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is disabled. >> >> Arnd > > Thanks for your comments. > > For performance, we decide always disable > CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS even if hardware supports > unaligned accessing. Therefore, I will remove kernel unaligned accessing from > nds32/mm/alignment.c. In other words, alignment.c only addresses unaligned > accessing for user space. I'm not really following that logic, let's go through that again so I understand the situation better. CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS should be set if and only if you have a CPU that does not need to trap on unaligned accesses. What are the hardware capabilities on nds32? Do you have all three categories: a) some CPUs that always trap on unaligned access b) some CPUs that never trap on unaligned access c) some CPUs that can be configured to either trap or not trap by the kernel? Arnd