From patchwork Thu Apr 8 04:05:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12189957 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.6 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 51037C433B4 for ; Thu, 8 Apr 2021 04:06:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F142E611BD for ; Thu, 8 Apr 2021 04:06:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F142E611BD 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 AB06A6B0096; Thu, 8 Apr 2021 00:06:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9E9286B0098; Thu, 8 Apr 2021 00:06:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8134F6B0099; Thu, 8 Apr 2021 00:06:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0072.hostedemail.com [216.40.44.72]) by kanga.kvack.org (Postfix) with ESMTP id 638A06B0096 for ; Thu, 8 Apr 2021 00:06:01 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 314783632 for ; Thu, 8 Apr 2021 04:06:01 +0000 (UTC) X-FDA: 78007861722.16.BB671AE Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by imf12.hostedemail.com (Postfix) with ESMTP id 87808D2 for ; Thu, 8 Apr 2021 04:05:57 +0000 (UTC) Received: by mail-qk1-f177.google.com with SMTP id z10so896438qkz.13 for ; Wed, 07 Apr 2021 21:06:00 -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=mQmK3SsBkKt3YHt5HRugbQ4C32Fw5itH9aDNQf+nmJI=; b=elWVu7ElduDgar7M15pPxIjNtGuFk2IxD56SO/LLqYMadH0bLeFPVdDJrrgXHMQQHY 5O+hPoZGbI2/fKrRlolSphZQemU4b8fO04rT4MR4ge8GzoS//g8BcNoHJnDWpxtXN6m6 K4yt0Ll7DaykR8Tyr8MCv2ALdhZZld2Z8v2GxISaLhL5P8n+yqVTAzsr885OTW/r/CaI ZWy3CSy0Jkc5aLPCQK2fFbp0qgOEgsvZVoIRkykT6rD/cRQui4N8LS/GWlBbLALSY4Jx +gOmt9BWnaITKKFW5XLWpNvETX8hDJzB/44NqbVBwH4mg3CMwDb3PBBB0DlOUtBELbj+ 7j3g== 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=mQmK3SsBkKt3YHt5HRugbQ4C32Fw5itH9aDNQf+nmJI=; b=LFLY+2ODi4IK+tISN2crZP9h1cnm+VAQQI9Cbma7P3btER28ENoU/PaGrKtAePBtcG tACjIdJdEbpAhbqBVRY1Q1g+7vhhJsk8ItJniArI0V9FXUpHzK2SV8Y0mLXtXq6FTqfq iFdnEsuraj+eHPo+mRbpfeXI1tGe974cDMLji1aLqiDMmt4Jv3gfV/aOhe15+DwRVCYb 3/cZWo3FQvKHYaOHC85pF+X/jFvGaLUPxgL+rBf/dvjFWqb/oR8tQux8p1cvMVLfZMLY 3lMlGDFNKgcotsCm6/qHayri6O74ulNAMQpEPTcZz+knp24F4mejukPgTmi+pl2IkOqE VkYQ== X-Gm-Message-State: AOAM532BsUa76Wnp2WnChgWMWdz9URr9/+es/gl7HqmZnGPRQIQOaW7u IHlPfd5uhHh1UswaOS5pwczU0Q== X-Google-Smtp-Source: ABdhPJw8BJbPk7oxJbt5TiRHY20STpCei8pN80U8MVBJiPqRcb2nWUnW5QpsnWL/n+1r5eSXF613pQ== X-Received: by 2002:a37:c92:: with SMTP id 140mr6714935qkm.177.1617854760170; Wed, 07 Apr 2021 21:06:00 -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 207sm18177874qkl.125.2021.04.07.21.05.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Apr 2021 21:05:59 -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 Subject: [PATCH v13 16/18] arm64: kexec: remove the pre-kexec PoC maintenance Date: Thu, 8 Apr 2021 00:05:35 -0400 Message-Id: <20210408040537.2703241-17-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210408040537.2703241-1-pasha.tatashin@soleen.com> References: <20210408040537.2703241-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 87808D2 X-Stat-Signature: hp1drzmzw68koq1rkby7xksnbti99z1x Received-SPF: none (soleen.com>: No applicable sender policy available) receiver=imf12; identity=mailfrom; envelope-from=""; helo=mail-qk1-f177.google.com; client-ip=209.85.222.177 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617854757-632303 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 d5c8aefc66f3..a1c9bee0cddd 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;