From patchwork Thu May 27 15:05:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12284557 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 8DF7EC4708B for ; Thu, 27 May 2021 15:06:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3612461005 for ; Thu, 27 May 2021 15:06:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3612461005 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0B9496B0088; Thu, 27 May 2021 11:05:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 090EF8D0001; Thu, 27 May 2021 11:05:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DFE356B008A; Thu, 27 May 2021 11:05:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0245.hostedemail.com [216.40.44.245]) by kanga.kvack.org (Postfix) with ESMTP id 9DEFB6B0088 for ; Thu, 27 May 2021 11:05:54 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 403C9180388F0 for ; Thu, 27 May 2021 15:05:54 +0000 (UTC) X-FDA: 78187335828.36.45D9FE4 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by imf28.hostedemail.com (Postfix) with ESMTP id B41632000981 for ; Thu, 27 May 2021 15:05:45 +0000 (UTC) Received: by mail-qt1-f173.google.com with SMTP id t17so403167qta.11 for ; Thu, 27 May 2021 08:05:53 -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=HZHOJzSFFbUuzx7eGvKvsp2IVzsfaWJrcIfDcXhfmjQ=; b=OE2Nv9rI1yl+eDr9xb/59iX9oopmd3JLdS6dWVrola8Od1OZixPXWsBxDTcSsG/BNj xqiP3/MtToHN8To0OOVfsTQ3FBtribEObmkQCfcGTb2XGrrt2TWIa9A+RUVytD4Z/F1Z kKpuTAqZN0nSiaH9NmXyCZVROaX3De/0QTwv6XiQhtVj2j7cm6+ofwNN8zS5yUCs8bE9 5f7KTwgzvzQxt+xXns0fOIqMOfXSXcBgLh+YZVajTxS7x88UNgl5ov6gRjoqo7qNpKeE aJtrlwWbPDLsQi9BZulXO6txvlllHE94kB0RXJGsAb9bZtu3H53chND0bq2jH+PtgScr gSdQ== 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=HZHOJzSFFbUuzx7eGvKvsp2IVzsfaWJrcIfDcXhfmjQ=; b=GrMBfgnYwhBP37YXsM9lB8Ip/N/J0oBS1qNJXNaGOVFaSiM7s1FfddPhQyI4xmfv8N bu16/TIsG0iv7aU8UL7vTejvFL9zcqNiX3Ci8PPoxRLl08cnjpEe+QhScQG+b2phURka /XGBuS78CS7zNp7fx3vL1eRExMgCk+/kPZfH3xPfiSpiSsE0OKmW3T3f8FVIynKQnrw3 OfJFTYA/nOBgxJ/PdSfdVLCzuMJbms9UDyYGO/ePlnfJ+tK6wRbtrVFXbGH6kX083yz/ udzb4zg3JQ9xnWhF9ndHgicrrORuOVFFs42eQ9Ozfa/B5feCfMOlfVzeN95geahxmX9s DYTw== X-Gm-Message-State: AOAM5301WLU5nnCpwCQrg0KsHiBrE/UZ/0LRjxKUGL1OxK9m2chYlOD0 iPvZf6p4KDFBVPKLKrVFV6IZWA== X-Google-Smtp-Source: ABdhPJwQ7PTEJ4bfTYMlyGqHPr1GFZ98OMMmMZTDk2VsdokJOvRo2GHvow0yZur+w4JE/untrcRTcA== X-Received: by 2002:ac8:66da:: with SMTP id m26mr3565077qtp.102.1622127952711; Thu, 27 May 2021 08:05:52 -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 x10sm1447468qkh.124.2021.05.27.08.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 08:05:52 -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 16/18] arm64: kexec: remove the pre-kexec PoC maintenance Date: Thu, 27 May 2021 11:05:24 -0400 Message-Id: <20210527150526.271941-17-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527150526.271941-1-pasha.tatashin@soleen.com> References: <20210527150526.271941-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: B41632000981 Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=OE2Nv9rI; dmarc=none; spf=pass (imf28.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.160.173 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com X-Rspamd-Server: rspam03 X-Stat-Signature: to5uoru66ttcdc3gehwqecuqobqfjtf8 X-HE-Tag: 1622127945-732182 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. Co-developed-by: James Morse Signed-off-by: Pavel Tatashin --- arch/arm64/kernel/machine_kexec.c | 40 ------------------------------- 1 file changed, 40 deletions(-) diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c index 96a478d022b6..afbde4bb1829 100644 --- a/arch/arm64/kernel/machine_kexec.c +++ b/arch/arm64/kernel/machine_kexec.c @@ -76,45 +76,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; - - __flush_dcache_area(kimage, sizeof(*kimage)); - - for (entry = &kimage->head; ; entry++) { - unsigned int flag; - void *addr; - - /* flush the list entries. */ - __flush_dcache_area(entry, sizeof(kimage_entry_t)); - - flag = *entry & IND_FLAGS; - if (flag == IND_DONE) - break; - - addr = 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. */ - __flush_dcache_area(addr, PAGE_SIZE); - break; - case IND_DESTINATION: - break; - default: - BUG(); - } - } -} - /** * kexec_segment_flush - Helper to flush the kimage segments to PoC. */ @@ -200,7 +161,6 @@ int machine_kexec_post_load(struct kimage *kimage) __flush_dcache_area(reloc_code, reloc_size); flush_icache_range((uintptr_t)reloc_code, (uintptr_t)reloc_code + reloc_size); - kexec_list_flush(kimage); kexec_image_info(kimage); return 0;