From patchwork Mon Aug 2 21:54:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12414817 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF71DC4338F for ; Mon, 2 Aug 2021 21:54:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8F8B660E78 for ; Mon, 2 Aug 2021 21:54:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8F8B660E78 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 6EFDB8D000F; Mon, 2 Aug 2021 17:54:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6295B8D0002; Mon, 2 Aug 2021 17:54:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4794E8D000F; Mon, 2 Aug 2021 17:54:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id 272128D0002 for ; Mon, 2 Aug 2021 17:54:30 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D257E181AEF23 for ; Mon, 2 Aug 2021 21:54:29 +0000 (UTC) X-FDA: 78431495058.36.C43B59C Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) by imf22.hostedemail.com (Postfix) with ESMTP id 86C863F40 for ; Mon, 2 Aug 2021 21:54:29 +0000 (UTC) Received: by mail-qv1-f45.google.com with SMTP id js7so7079546qvb.4 for ; Mon, 02 Aug 2021 14:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=r+CYCZCiU1cMcD+VmU9RhDaYUtg7Su3wxwCheymC23U=; b=jctFebjkj3S+TT2x0nauprSV2wyj0PwRV40R5o4/TRvvfjkGSMl96RZP+Aqp2IFQ5m IR9X6dgSW4nno0xAh35XttKT4va3Hvq6tlueaS40BE+3FKdhcycgnE6xBVMQT7TAZqUE 71O9mr3Wl8Mt6kce6WpT8dOMeSrUaOYwFzLXe3sdZHUGXr6ohZfCVt6qsTEC9SNDWKkm R4+sJuqlCeOZZi5H9J3GsMLXN4keopqd+c5IcdI6xf4XJNoEwSiPEuX0wV5kIrPmvVHC 01mW7aNFawtNFDhbUR4mjsfOOn0j1N9LKv2W8Lkg0DREVeqoFcXJ+gaiBNsjZ5hVnO2K kaHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r+CYCZCiU1cMcD+VmU9RhDaYUtg7Su3wxwCheymC23U=; b=O+AAk29Ui33oRsm4YzHFzUCGDozvVJMk7Ws0OiXjL88YAivNedg/fkCxHoqcPl6ryl xp3penMc1MrB4ZGUDKDJ/kdo8Lvpu9ldOIo1qTiMX66C/605h8chG1ni9YYG2EQpFDFO 9nA/1gBWc5lzjFcm6okXh5CsPKL85RL5rdtyddY8PEtlevTyv084fBrTppCnu2YmhqAp 8UGx/TPXxMHTToMfqoHwNlgKxV9b9r4cuFwPQhccdG8dpuQ/gBBqsqBiWJ7cMZRq+GVm Sf//UuI40Iz+0N04gUHnNWM6L9YJN/DrWU6x+ersmHuJZOzucJWmcREcBVyw2hwEAiLk 4nxQ== X-Gm-Message-State: AOAM532nfPgSbIqoAQ/Dfxsz0Rc4jwzoHtn2v3ll0C91kK9z8mS9deyH eGhLdNY1JpXkdQKcA4T1m+oLPw== X-Google-Smtp-Source: ABdhPJyd/VxX84pagYf1ZcTV+T5GT+qS17GuV4XbvkFGYFpX9dQIB5Z9oz1yWxX+Lk4ixOmma8alIw== X-Received: by 2002:a0c:c2d3:: with SMTP id c19mr18681667qvi.62.1627941268973; Mon, 02 Aug 2021 14:54:28 -0700 (PDT) Received: from localhost.localdomain (c-73-69-118-222.hsd1.nh.comcast.net. [73.69.118.222]) by smtp.gmail.com with ESMTPSA id v11sm5479216qtc.0.2021.08.02.14.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 14:54:28 -0700 (PDT) From: Pavel Tatashin To: pasha.tatashin@soleen.com, jmorris@namei.org, sashal@kernel.org, ebiederm@xmission.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, maz@kernel.org, james.morse@arm.com, vladimir.murzin@arm.com, matthias.bgg@gmail.com, linux-mm@kvack.org, mark.rutland@arm.com, steve.capper@arm.com, rfontana@redhat.com, tglx@linutronix.de, selindag@gmail.com, tyhicks@linux.microsoft.com, kernelfans@gmail.com, akpm@linux-foundation.org, madvenka@linux.microsoft.com Subject: [PATCH v16 13/15] arm64: kexec: remove the pre-kexec PoC maintenance Date: Mon, 2 Aug 2021 17:54:06 -0400 Message-Id: <20210802215408.804942-14-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210802215408.804942-1-pasha.tatashin@soleen.com> References: <20210802215408.804942-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 86C863F40 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=jctFebjk; dmarc=none; spf=pass (imf22.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.219.45 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com X-Stat-Signature: at6mtp9gshkyg5qg4fj4fg5p7tj373b3 X-HE-Tag: 1627941269-381114 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Now that kexec does its relocations with the MMU enabled, we no longer need to clean the relocation data to the PoC. Suggested-by: James Morse Signed-off-by: Pavel Tatashin --- arch/arm64/kernel/machine_kexec.c | 43 ------------------------------- 1 file changed, 43 deletions(-) diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c index b43195a7fcb6..b1856f34cc51 100644 --- a/arch/arm64/kernel/machine_kexec.c +++ b/arch/arm64/kernel/machine_kexec.c @@ -77,48 +77,6 @@ int machine_kexec_prepare(struct kimage *kimage) return 0; } -/** - * kexec_list_flush - Helper to flush the kimage list and source pages to PoC. - */ -static void kexec_list_flush(struct kimage *kimage) -{ - kimage_entry_t *entry; - - dcache_clean_inval_poc((unsigned long)kimage, - (unsigned long)kimage + sizeof(*kimage)); - - for (entry = &kimage->head; ; entry++) { - unsigned int flag; - unsigned long addr; - - /* flush the list entries. */ - dcache_clean_inval_poc((unsigned long)entry, - (unsigned long)entry + - sizeof(kimage_entry_t)); - - flag = *entry & IND_FLAGS; - if (flag == IND_DONE) - break; - - addr = (unsigned long)phys_to_virt(*entry & PAGE_MASK); - - switch (flag) { - case IND_INDIRECTION: - /* Set entry point just before the new list page. */ - entry = (kimage_entry_t *)addr - 1; - break; - case IND_SOURCE: - /* flush the source pages. */ - dcache_clean_inval_poc(addr, addr + PAGE_SIZE); - break; - case IND_DESTINATION: - break; - default: - BUG(); - } - } -} - /** * kexec_segment_flush - Helper to flush the kimage segments to PoC. */ @@ -207,7 +165,6 @@ int machine_kexec_post_load(struct kimage *kimage) (unsigned long)reloc_code + reloc_size); icache_inval_pou((uintptr_t)reloc_code, (uintptr_t)reloc_code + reloc_size); - kexec_list_flush(kimage); kexec_image_info(kimage); return 0;