Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6136387imu; Tue, 13 Nov 2018 18:20:51 -0800 (PST) X-Google-Smtp-Source: AJdET5eIiB6L49ek3+lT634cqA3oJ/M3jBKkCq1M9o61EsfmOrUWugOH5RQmY3rZ0gIoeT1U+Bt7 X-Received: by 2002:a17:902:4165:: with SMTP id e92-v6mr26125pld.209.1542162051665; Tue, 13 Nov 2018 18:20:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542162051; cv=none; d=google.com; s=arc-20160816; b=yj4/YnRDL5phq+OM7HCbPsrmawFHZ40J6DXB7iPM/YKb7jb8DqZV3+48i/chATt4KR rkB/m/sbjlqTTz3K/8ROuqW9gXuiSRAOhEeiJ7mJ3Yz+7QBgVN38WN29mw5esIHSFPqS BrgaAvzz7kfuNf/fae6rSeaUWY9VHVqd0ZBREsq52uBMM27y9uqaZhCgc6qso7YjlDVd LJ0q2xeM29m1SJruyVxB8InFYxFr0c5ZVas+Y30S9JSr8LqvoO+yrbZRHq2mu57Tm5M2 hxJHnR+CwPDF8/S2yHvrwDiYYUzExftY0tT8KFRdZOfWKKicNY/q+pMDJZkwHXa/B25z +yFw== 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=6Nn8Ur6IMqBLARyk5azxZGBBPdC2BvYXrwANo9dQnAM=; b=MERQgo8x76OOvZPvUzZr0rl26PV4/jw3BrNhxcnRKcEUmXERSb9qj3Dc7U22yApQuO Xwvfn6JonLw50+yWd1TENvoYEBW1WQ4EU1iROcObk3qVI/ENAjzkVNtoRrzS9hLolAyN Ae8AOjgIJK28yZr0JZ0amcMbGNbO9jITJmI2FqtwgkEvy7hBBnRKVF+o4qU78LU1uDQs e9i3Nf66gM7klfCO8mvBr0QJw62z5tiKltY6Wr8j/TWvtMVKeVcetM2yu3eoMOCOnrj2 xu3Q0GNKXl1/mnzvyAzq8DnBr3RIzF3uQKgzDEWIVj7i3nCcDvIt12Xeb678hlbv7w13 xhBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=koOAXpcK; 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 q1-v6si23643750pfb.258.2018.11.13.18.20.36; Tue, 13 Nov 2018 18:20:51 -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=pass header.i=@gmail.com header.s=20161025 header.b=koOAXpcK; 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 S1732034AbeKNMVB (ORCPT + 99 others); Wed, 14 Nov 2018 07:21:01 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:43128 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbeKNMVB (ORCPT ); Wed, 14 Nov 2018 07:21:01 -0500 Received: by mail-pl1-f195.google.com with SMTP id g59-v6so6973662plb.10 for ; Tue, 13 Nov 2018 18:19:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6Nn8Ur6IMqBLARyk5azxZGBBPdC2BvYXrwANo9dQnAM=; b=koOAXpcKULybhGOSXLzvVz9kv5p2UfZ5tgfQjRpNm8XrJuyOiavkeOLqS/4rgZbJ4o Ey/40JA7GtsAnVIhP2aW43YCzFr0h4Cf0XNjBtReWVXKo4AkPaoPtryEk7IAVFpXcpir tnwZfomCRADFHW9ivlc97GqUTUAWe2i3E8v1638YAh6LluzN9KAv+PyJj2y/TN+rM8Bv 3tnvOdmOHhbNCLfXgyLKvYwEtwGkzNGqUJp+QV8/7uWgNPapBbQ1WVp8d89FSjJElVXH HmYd48Ar38rgj7bxQ9/wB4T1vT8DiWbP3JQiEZ1PKtPOz/FBV/GPOAVMbKpEV3lv4y46 ntcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6Nn8Ur6IMqBLARyk5azxZGBBPdC2BvYXrwANo9dQnAM=; b=sL/A76BG2LCin8HAGLOqss8/mL4uE7468L01rBIWI7wVjLy2lydm9Tn9nrQWTWDgC2 a8EY+AsiBwoaqLEYSDxoEW74sUxmbHl7VAVYFJG+2zZtu2rwytxm0ke3xJrVzh8PMVaB ZCytMzBqfcutbXkzKMSYZSOnomumSdD+yq2JXm55X6BggKyuREU5L4z/N0KlZ3UEm8JY uCnYoQKfSiO5PDEo1zClOuB9Hh7sCEnBck9RkQbp2K9V76zbXDs4tfPgLEoG44Vr3IYW Paz+7Hn4xs8hxNON7cJJ+kWtbuhNCr8IhE5vRcqGnOhiY/XpDeAeOy8rioUahRjKUyp9 4Szw== X-Gm-Message-State: AGRZ1gJ2GtKYqrqsT9Bb/WPuonI/z945lPnlI/YzeFl7zj+pQzAqG+9R MIlr/+G7lnhKeZtV4sBdtfg= X-Received: by 2002:a17:902:6bc1:: with SMTP id m1-v6mr75651plt.34.1542161995765; Tue, 13 Nov 2018 18:19:55 -0800 (PST) Received: from mail.google.com ([2001:19f0:6001:4ff6:5400:1ff:feb7:a195]) by smtp.gmail.com with ESMTPSA id s2-v6sm44776271pfk.133.2018.11.13.18.19.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Nov 2018 18:19:55 -0800 (PST) Date: Wed, 14 Nov 2018 02:19:53 +0000 From: Changbin Du To: Stafford Horne Cc: Changbin Du , jonas@southpole.se, stefan.kristiansson@saunalahti.fi, openrisc@lists.librecores.org, linux-kernel@vger.kernel.org, Masahiro Yamada Subject: Re: [PATCH] openrisc: make function cache_loop() inline Message-ID: <20181114021952.r4wvjrvgy6hb24xh@mail.google.com> References: <20181112155544.7230-1-changbin.du@gmail.com> <20181113204953.GF2718@lianli.shorne-pla.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181113204953.GF2718@lianli.shorne-pla.net> User-Agent: NeoMutt/20180716-508-7c9a6d Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 14, 2018 at 05:49:53AM +0900, Stafford Horne wrote: > On Mon, Nov 12, 2018 at 11:55:44PM +0800, Changbin Du wrote: > > The third operand of mtspr instruction must be a constraint. To guarantee > > this condition, function cache_loop() which uses macro mtspr() must be > > inlined. So let's force it as 'inline'. This is to fix compiling error with > > new option CONFIG_NO_AUTO_INLINE. > > Thanks for looking at this. > > Do you mean, must be a 'constant'? > yes, it is 'constant'. sorry for the misstake. > I think this fix is fine for now. Can you add it to your 'kernel hacking: GCC > optimization for better debug experience' series? > hi Yamada, could you add this patch to your kbuild tree? thanks! > > In file included from arch/openrisc/mm/cache.c:17:0: > > arch/openrisc/mm/cache.c: In function 'cache_loop': > > arch/openrisc/include/asm/spr.h:20:27: warning: asm operand 0 probably doesn't match constraints > > ^ > > arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr' > > mtspr(reg, line); > > ^~~~~ > > arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm' > > > > Signed-off-by: Changbin Du > > Reported-by: kbuild test robot > > Cc: Stafford Horne > > Cc: Masahiro Yamada > > Acked-by: Stafford Horne > > > --- > > arch/openrisc/mm/cache.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/openrisc/mm/cache.c b/arch/openrisc/mm/cache.c > > index b747bf1fc1b6..4a4b2b6e006b 100644 > > --- a/arch/openrisc/mm/cache.c > > +++ b/arch/openrisc/mm/cache.c > > @@ -20,7 +20,7 @@ > > #include > > #include > > > > -static void cache_loop(struct page *page, const unsigned int reg) > > +static inline void cache_loop(struct page *page, const unsigned int reg) > > { > > unsigned long paddr = page_to_pfn(page) << PAGE_SHIFT; > > unsigned long line = paddr & ~(L1_CACHE_BYTES - 1); > > -- > > 2.17.1 > > -- Thanks, Changbin Du