Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5855909imu; Tue, 13 Nov 2018 12:50:46 -0800 (PST) X-Google-Smtp-Source: AJdET5cn9GQZq+HY8TGssaqj3zDJrdEqgsInmg/C0BpSG76zI0xEXP6vSaPtS5irFQ7btTn8tX0h X-Received: by 2002:a17:902:714e:: with SMTP id u14-v6mr6714978plm.8.1542142246677; Tue, 13 Nov 2018 12:50:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542142246; cv=none; d=google.com; s=arc-20160816; b=InMzRVEfNpS+pT1OXqG7o3tbvpDzY4gugu0EtBONSc2Q0eMBWg28MwsgnBnHSTDvT0 Y/B8yg4u0zQEFDTGhdju0YTHT8X1tVEkgP6EuxBUn7qwq+YOzRyiX9Fko5+lNoKS0inJ DnoM253FgxlYtUHT8pNDwHBMOlcpyN26GOG9FOb2ZwPnBeLFDe1DbJqyx//rkHudgrEG zQqMgN9AlfG5Scbxgq780yL1Z4GvYo6B1Vllo1r923/WhyGF4TqxcZf6wfnv7rQ5Pl66 L9KGhFdXSbQ0Jwvr8Kkj+Br1/aiMdK5kiKr9G4J7FGjog00URGvSVB6MZYilmmHp5wpq IB8w== 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=L+a+PpzR+nfG0aAKhuAuU4VCxpLWpasx0RwxjXMeCXM=; b=f3Ykq+Z85tGJuU5gXJ0Ttj8DKPvcRgUD3SzZt5uhZV5EEO98hMEWAuW3U2wPlpprWa c/iDRWkThBa0dYyKpUYuA9XZAVBKd0I8OGVw6clqZYpz2+HcRiyajipq2s9FKFnBebR8 Oy258ZHzpVY4laRAP+mzpjlDfcysGeP+GPXf1SXQZUy66fs0MFp0e+Zhb691emSKmSl6 m7b4jlWrVLB4ob5zNfFFjh3PlYpbmOTHj198ImRf3ZMlBFxUDOmR1ezXhn6H23mRWioT Tuq0bYUnydsfic4ooAASaNXWtF+xaba0LH9a7sE5j1LPn6OTUih9NiXbnWXju9CB0IPp ZnQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CDl9T6F8; 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 d39-v6si7594150pla.158.2018.11.13.12.50.26; Tue, 13 Nov 2018 12:50:46 -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=CDl9T6F8; 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 S1726659AbeKNGtt (ORCPT + 99 others); Wed, 14 Nov 2018 01:49:49 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42567 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725748AbeKNGts (ORCPT ); Wed, 14 Nov 2018 01:49:48 -0500 Received: by mail-pg1-f194.google.com with SMTP id d72so2810925pga.9 for ; Tue, 13 Nov 2018 12:49:55 -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=L+a+PpzR+nfG0aAKhuAuU4VCxpLWpasx0RwxjXMeCXM=; b=CDl9T6F8JsxmWV/KIrVRjPAF16+fNC8FVATaEzA7iusuHJy+SAvVsmm/xw+6ssmGCY 0yH1GBiLm+RGCaA/KLhO6Jqod3OP769f5PvMWnLzI9Ln/6aE/sTdBl7AmsaH4pkTgPg1 0/DsbryHTflPFbk7qzwaTHwp3l/ngJWz8qdthRKwNwqp0zpQhar4NMskcnIMWJ9j917q Vs+xvBV164lnJj0eqj5lTnpuWyA7S1/v71Fud92LVBSIblKAPso9G2Dcn1o/TorDFEjA 4PEPnoOhR8/NeTwIN7xt/y5utp/rZ43EipUTZYDJdRaq4Xj457JV7YyInUnaS82apgvR wgBg== 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=L+a+PpzR+nfG0aAKhuAuU4VCxpLWpasx0RwxjXMeCXM=; b=e7KEJtJsJGdWmUG6dTtL+8lOHR01Ek0AMXExTnJIa68Fwo5qqvUkLv7+gmXBFV8Umf hQxrFK1JKXpp1rO7Xqh9twkolRJOY6gh4tUxd44LCmbdTQtGj63veTWTpxw0lYPtLVc7 1QRc4KhCFYcxMNFLo6EMdbcZQqZYyPbmq0Y7IlCkQDA4ohfCcNaRsSbuQO/oWB4jZHlH 7/UlP8eme6wLpeZ5Q8CYSzo2ekErgoSNV9nBw3sYWzRCcf3JuOBap1w2OJgp/9wguNgq hto4RpumE3dI+R/eer4DMijz4sQOqrz7fG79S8tK9O+GRt+KJmUwE6IH8OkbPu0ayBYq Mxsw== X-Gm-Message-State: AGRZ1gLA80oD11iU1J2DE1rJuJ/3tj40B/63jIxKDdlXPc5g+R9TLLmH G2RLUN69n/xzkxm0M0nUvEI= X-Received: by 2002:a62:f5da:: with SMTP id b87mr6784924pfm.253.1542142195307; Tue, 13 Nov 2018 12:49:55 -0800 (PST) Received: from localhost (g148.61-193-223.ppp.wakwak.ne.jp. [61.193.223.148]) by smtp.gmail.com with ESMTPSA id q8-v6sm31801171pfa.18.2018.11.13.12.49.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Nov 2018 12:49:54 -0800 (PST) Date: Wed, 14 Nov 2018 05:49:53 +0900 From: Stafford Horne To: Changbin Du Cc: 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: <20181113204953.GF2718@lianli.shorne-pla.net> References: <20181112155544.7230-1-changbin.du@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181112155544.7230-1-changbin.du@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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'? I think this fix is fine for now. Can you add it to your 'kernel hacking: GCC optimization for better debug experience' series? > 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 >