From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:57649 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727268AbeHKOYh (ORCPT ); Sat, 11 Aug 2018 10:24:37 -0400 Date: Sat, 11 Aug 2018 13:50:35 +0200 From: Greg KH To: Max Filippov Cc: stable@vger.kernel.org Subject: Re: [PATCH] xtensa: limit offsets in __loop_cache_{all,page} Message-ID: <20180811115035.GA444@kroah.com> References: <20180811074405.4124-1-jcmvbkbc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180811074405.4124-1-jcmvbkbc@gmail.com> Sender: stable-owner@vger.kernel.org List-ID: On Sat, Aug 11, 2018 at 12:44:05AM -0700, Max Filippov wrote: > When building kernel for xtensa cores with big cache lines (e.g. 128 > bytes or more) __loop_cache_all and __loop_cache_page may generate > assembly instructions with immediate fields that are too big. This > results in the following build errors: > > arch/xtensa/mm/misc.S: Assembler messages: > arch/xtensa/mm/misc.S:464: Error: operand 2 of 'diwbi' has invalid value '256' > arch/xtensa/mm/misc.S:464: Error: operand 2 of 'diwbi' has invalid value '384' > arch/xtensa/kernel/head.S: Assembler messages: > arch/xtensa/kernel/head.S:172: Error: operand 2 of 'diu' has invalid value '256' > arch/xtensa/kernel/head.S:172: Error: operand 2 of 'diu' has invalid value '384' > arch/xtensa/kernel/head.S:176: Error: operand 2 of 'iiu' has invalid value '256' > arch/xtensa/kernel/head.S:176: Error: operand 2 of 'iiu' has invalid value '384' > arch/xtensa/kernel/head.S:255: Error: operand 2 of 'diwb' has invalid value '256' > arch/xtensa/kernel/head.S:255: Error: operand 2 of 'diwb' has invalid value '384' > > Add parameter max_immed to these macros and use it to limit values of > immediate operands. Extract common code of these macros into the new > macro __loop_cache_unroll. > > Cc: stable@vger.kernel.org > Signed-off-by: Max Filippov > --- > arch/xtensa/include/asm/cacheasm.h | 65 +++++++++++++++++++++++--------------- > 1 file changed, 40 insertions(+), 25 deletions(-) This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.