Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2984738imu; Sun, 9 Dec 2018 14:18:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/UutSbYdt/7Lq6jW+EfXBqKbjUfX7Rmu0rHaMCsvGxOZAs7LgGw4t1Ku6iF24kz4Z0W1kt7 X-Received: by 2002:a63:fa02:: with SMTP id y2mr8896606pgh.177.1544393894082; Sun, 09 Dec 2018 14:18:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544393894; cv=none; d=google.com; s=arc-20160816; b=1DmlfbEiNynOAqwC5/q9YM2Qdq1CtVZl7zPUIxiBNbEPi6xHwxQuUhKlFWvGryQYJu uULNj5n0VucyqVAJdB3w7OEJvoovb4h4ufPX5HMZ98gDJtp+91wgatBz2Ny+x8GSzuZK +/NYWgSRNjqCvEBuMhsPv866FUYNmZTkyfD0Pbct6yXfqkJI2l4dspbfxTMFyfenDFvw 0Ctz2BwpAErnFOdC/NjAkKYHTS/esnOSmZKIg3lijuGoRyadyZx2VI6tgt1nTmCEp2TC x9YPnN5ziXU+Bsn6TyL4uffVHsMy4I44BaAXnWAFCSRDUiaHpt0CJOsvhia6cagxtVB6 gFgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=S3g44vwC+nij7j6YcJEHiV+/a/KnhfTuwh1EpshAr+w=; b=eOft2kuLoL55QlUKjP30104oRNHtvn8CP3mbPJJKjIQVS0ty2CMJro2/27g75FyENw fG2Kx7hynyeFDyAa3pQfvaQ3lEXV7AuW8Hna1RV1erNmgtU6kYIQuGdj6GO6FMUJZFQ9 AJleOlICtHqwOz0DJO9YMYgNxeC+i0K6hHsjuqaKarxKUUkNLvruKzqgG4C1jAf3hXHP x2xbtcI/oJPiAeZ7VoY4F4YISFJuzA/n/Kbd4NP6SLM7LE7v0I+5TC3WitMJJkPWM24K E2eDbS1c/vagka75x9bYwOF0fTI6lv/5GTyEcPogAkN5fEBzZMczEJkdw7HymbysgM1u 2e1g== ARC-Authentication-Results: i=1; mx.google.com; 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 s5si8181589plp.139.2018.12.09.14.17.58; Sun, 09 Dec 2018 14:18:14 -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; 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 S1727730AbeLIWPb (ORCPT + 99 others); Sun, 9 Dec 2018 17:15:31 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:38198 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727187AbeLIWPa (ORCPT ); Sun, 9 Dec 2018 17:15:30 -0500 Received: from pub.yeoldevic.com ([81.174.156.145] helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gW73C-0002pp-8T; Sun, 09 Dec 2018 21:55:46 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gW72d-0003OH-FW; Sun, 09 Dec 2018 21:55:11 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Max Filippov" Date: Sun, 09 Dec 2018 21:50:33 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 137/328] xtensa: increase ranges in ___invalidate_{i,d}cache_all In-Reply-To: X-SA-Exim-Connect-IP: 81.174.156.145 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.62-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Max Filippov commit fec3259c9f747c039f90e99570540114c8d81a14 upstream. Cache invalidation macros use cache line size to iterate over invalidated cache lines, assuming that all cache ways are invalidated by single instruction, but xtensa ISA recommends to not assume that for future compatibility: In some implementations all ways at index Addry-1..z are invalidated regardless of the specified way, but for future compatibility this behavior should not be assumed. Iterate over all cache ways in ___invalidate_icache_all and ___invalidate_dcache_all. Signed-off-by: Max Filippov [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- arch/xtensa/include/asm/cacheasm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/xtensa/include/asm/cacheasm.h +++ b/arch/xtensa/include/asm/cacheasm.h @@ -119,7 +119,7 @@ .macro ___invalidate_dcache_all ar at - __loop_cache_all \ar \at dii __stringify(DCACHE_WAY_SIZE) \ + __loop_cache_all \ar \at dii XCHAL_DCACHE_SIZE \ XCHAL_DCACHE_LINEWIDTH 1020 .endm @@ -127,7 +127,7 @@ .macro ___invalidate_icache_all ar at - __loop_cache_all \ar \at iii __stringify(ICACHE_WAY_SIZE) \ + __loop_cache_all \ar \at iii XCHAL_ICACHE_SIZE \ XCHAL_ICACHE_LINEWIDTH 1020 .endm