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: 12190007 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 636C0C433B4 for ; Thu, 8 Apr 2021 04:17:01 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 556A9611C0 for ; Thu, 8 Apr 2021 04:17:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 556A9611C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QqqRfWfAnRNsVY6usBaa0NBN3wvGm58U+rzLkKHVabE=; b=EaOHwahYEWIW/K60BvFGK0rME TC2fOFpNksAdqjQQw5OaQTERKmfPw4okfgMQzoeLamO/0qW4UPipXjxL1qoWcLgGKp1xn0Ls+YWPd dHmx5yHxL+kpcwT13gTJJhxcGkdhbjis6sNuSpRM611ZM8fkwxBgpJfRh7Ez1269xfn9lSmyQeXr6 UyX3ul7Y+W7GQuaybW3VYvQn3+o60hUCiOGabO2Iosq3pNrMYTp7eW+JPXdphmUXVgkUMtJskNMfT o8ggJCiqXUpHh8pXL/wkOwgrjXvn0vw2PazZ8Yydk9RroboMshufcZk4pWUTyGtN7swbxrjkVRv/U Dve8zE1Yg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUM4S-006p2s-FH; Thu, 08 Apr 2021 04:15:12 +0000 Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lULvd-006ljT-FC for linux-arm-kernel@lists.infradead.org; Thu, 08 Apr 2021 04:06:05 +0000 Received: by mail-qk1-x72d.google.com with SMTP id c3so941715qkc.5 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=tUn+eQDMvwfKPnkiavobmXowpDKnfGL5VfCRS0MmSsmtkVPsWXL0VsPu2PTQ1XT9yl +/85t2RpaxF2fhYTDiZKYUbhE4NNJv2UbNVcEKyJ5QSbdb9WUMRqyA5YBYgZebtW1UDm ljZ6XAwvc8zHeLRTfIDB4cI/QmhAaYgF/6vapeHx8IC8kh6Wga4+zFL2QOSIcXzxczR7 LMzhVaOo55Iml4sKbuUF5L2SdVztik8StOLPUcUfnwnkK4A6X+9y4yLbKOWqZjW+9Tw2 UJ7nka5dhLDwS01xAZZ2e7tGsVdtYn16IwduwiB3eMiswio5Axq8Xn8iZoAa0utETR4B /bJw== X-Gm-Message-State: AOAM532buqAeMEoXtAqOSP8l6DSgjr+ITDIJaLhRFtr/Y1OP6bnJw83q ZFs3bewDYNgpU3XCgmXj9bggkQ== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210408_050603_292084_A2FCF206 X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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;