Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1119361img; Thu, 28 Feb 2019 13:24:23 -0800 (PST) X-Google-Smtp-Source: APXvYqx+0BsepQ/yJG+TYaSjNH6XJFgp96kw4Rj+cPm/GgCyyq9x5FEwBM7F6+pqBASY9phvr6qr X-Received: by 2002:a63:e101:: with SMTP id z1mr1267765pgh.190.1551389063249; Thu, 28 Feb 2019 13:24:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551389063; cv=none; d=google.com; s=arc-20160816; b=m+KSbhCCvXqg0nYNh4bYccF5wY2ydbkI6MjAOzk1GwN7a61HeMMZlRNR1+QFCJ3CaU VhxBZpdC7moSPRdi4/ieDg8AeZ+80YrJvFDAiVnhPQqC3sv3RuH1mTjRoJkNfFJV3fsF oVLA+0KDkDb0WqWGjTazEUEN/FCSZ4OTBr3FYhFp50ve7zOQoYD+ibXsRoaTtJeHkgAi 2osF+MQlVTRubY12dZ4xMu9EizMJJfBoLRC+wiBFri5s18lYsMethce09nl/MfAdqhfM g5fpIw+NIbme3Hzkvmg3exTzgDvo6t6u5Aq4uzgfCpmM7l6s6YKQogLWYaVxRaftelc/ K6/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=r52IwKxcJ2RGsUIV/p4ftIO1s6BzYhWv7Ch2Y/DlkMU=; b=nc37ufo+nb8TRy+vRxlo9vYkqOJx0ubGBF8vQCgW06rQO8uly1GCaJpCBtJFB1NNqz LgCZmMdTQJJotN7T+dK/s8l8xYJF+knPQMTvznXBwNB3isN7zVr6IscpSnV95tq1Jgww cvb8S0qgEbEIbCoHMwOUNsyz7mqb58FJgIkPUIpRfc7icCEitsjzaFHp8Sb0WEBfOsXt QpzgGSXMIfLZO5/756ZuPFAizi6TmhI78zEe1ltMS3uhxpD8gUVJXsqsfg2BT841ywcv +5P4phS+3xOvyDIlRQiL4/2Tip5DuAs/chOT8TZ/h+qWvgEBPNGfQT3Kzo7V1dcBKSAc O+5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=E3iLEpVA; 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 t13si9314399pfa.98.2019.02.28.13.24.08; Thu, 28 Feb 2019 13:24:23 -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=E3iLEpVA; 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 S1733210AbfB1S7d (ORCPT + 99 others); Thu, 28 Feb 2019 13:59:33 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40701 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731915AbfB1S7c (ORCPT ); Thu, 28 Feb 2019 13:59:32 -0500 Received: by mail-pf1-f193.google.com with SMTP id h1so10155997pfo.7 for ; Thu, 28 Feb 2019 10:59:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=r52IwKxcJ2RGsUIV/p4ftIO1s6BzYhWv7Ch2Y/DlkMU=; b=E3iLEpVA/88UNZ9/eRBTDkaLx3d6WCvsSkwr9iqiS7I9O/1h6LGLHc1BGJMhkazbu6 lHgz1dWVJWWRovSD7Yx6aOl/t7Fe9ndmzSs8bT14/h8RsznUNxXREFNDmmj1MalYrVC/ Pa1zu0MiI/GhYGJMnnuGGpbZWgFCsaIDsRDRHo0K/4qxu12A43MPWuDR8HTQOZ1G+YO8 vhYL6zOYFrvPI00Z2efK3f1jtWMt9X370g1TiWpaTpMZlHHsoP7APf6of6JGPHM6Z8xZ X1CtmyOPbsbcKqMogDLvfa/jlGsN3jQext+SRynKPhXK87V1wPrYq21pWU31VAIrGLcS WFyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=r52IwKxcJ2RGsUIV/p4ftIO1s6BzYhWv7Ch2Y/DlkMU=; b=DkzNvp0vDiiWbzAoIDpVxwkM3Opsrihh9jbLIkf7Dpx3zjf26eP6lSMwKgJc7k78+N eiHWaurYXNZm+cL0UcmgJAH0odcrEaXz4uYXnH7TlTMrY6CqKMqhqCLXfNKSHvWwI29S w3SL0yllsrBImgRzrCkXACUUuxqIBRchbcA2FBBIX5qd30EP0XwBnWZ3HZhlzQGmE2TY 7ipTQCUoAQ2iXUjtFd0VvXajTP7Uq0j+otFHUOfA0njLjfj/hzxVcd8kkB/Y6q6umXiZ 5/1MkLEIdOzCX9yRqTf4YEfRjPnsXdNvNYnsuzcF+Fnmb2YN+Hre1vfjmO+Q0AQuAGFl GVNw== X-Gm-Message-State: APjAAAWO9a5mFNIFheDKsFXtT1VTnYgZ9Ls9W/gStFgIBMxmDouj2txZ BrAUM4O8OpxbqoMO/06Jy5g= X-Received: by 2002:a65:4c01:: with SMTP id u1mr675214pgq.116.1551380371828; Thu, 28 Feb 2019 10:59:31 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id e123sm23284582pgc.14.2019.02.28.10.59.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Feb 2019 10:59:30 -0800 (PST) Date: Thu, 28 Feb 2019 10:59:29 -0800 From: Guenter Roeck To: Vineet Gupta Cc: Eugeniy Paltsev , Claudiu Zissulescu , "linux-snps-arc@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ARCv2: Add explcit unaligned access support (and ability to disable too) Message-ID: <20190228185929.GA9842@roeck-us.net> References: <20190228174742.GA18868@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 28, 2019 at 06:12:33PM +0000, Vineet Gupta wrote: > On 2/28/19 9:47 AM, Guenter Roeck wrote: > > On Wed, Jan 30, 2019 at 07:32:41PM +0300, Eugeniy Paltsev wrote: > >> As of today we enable unaligned access unconditionally on ARCv2. > >> Do this under a Kconfig option to allow disable it for test, benchmarking > >> etc. Also while at it > >> > >> - Select HAVE_EFFICIENT_UNALIGNED_ACCESS > >> - Although gcc defaults to unaligned access (since GNU 2018.03), add the > >> right toggles for enabling or disabling as appropriate > >> - update bootlog to prints both HW feature status (exists, enabled/disabled) > >> and SW status (used / not used). > >> - wire up the relaxed memcpy for unaligned access > >> > >> Signed-off-by: Eugeniy Paltsev > >> Signed-off-by: Vineet Gupta > >> [vgupta: squashed patches, handle gcc -mno-unaligned-access quick] > > Hi, > > > > with my brand-new gcc-8.3.0, built from upstream gcc, this patch > > results in > > > > arch/arc/kernel/setup.c: In function 'arc_cpu_mumbojumbo.constprop': > > include/linux/compiler.h:348:38: error: > > call to '__compiletime_assert_326' declared with attribute error: gcc doesn't support -mno-unaligned-access > > Sorry it broke ur build - but it did catch a deficiency in compiler as intended - > yay ! > > > when trying to build allnoconfig or tinyconfig. I get the same results > > with gcc-8.2.0. > > Unaligned access code gen was enabled by default in 7.x actually, but us OS folks > were late to find that which led to the recent patch to disable it which was > broken in gcc. > Claudiu fixed gcc promptly but that patch didn't make it to upstream, which I've > posted now. > > http://lists.infradead.org/pipermail/linux-snps-arc/2019-February/005522.html > > > Do I need some special compiler configuration flag when building the > > arcv2 toolchain ? Or am I simply out of luck for using upstream gcc ? > > Once the patch hits mainline you could use that. In the mean time I'll back out > the "detector" as it might trip other people too. > Can you possibly use $(cc-option,-mno-unaligned-access), or would that defeat the purpose ? > Many Thx for your testing service. My pleasure. Thanks, Guenter