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: 12284743 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=-17.1 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 00FF1C47089 for ; Thu, 27 May 2021 16:20:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C0358613C0 for ; Thu, 27 May 2021 16:20:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0358613C0 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=bombadil.20210309; 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=Jn71T7TqLBRDSshpR9AJnNQaZAin3eUT562GlHnz3IM=; b=m1HQ/FQlrwxswd wQCm5vZflVmotEGG5//78uega8HMGx8nqClNDJ+UGGU9eceXrr972z9pNTco2a6MWP6TKwroEnX8z 8AnW31g4nppVJ9knNStPpHOwH1BxHf1P/KzkiIpxYF3bzZ7n9b0NSYSvafnXKf2xWwux6q2PkBjun 9UGq/6SjVwcP9EHNHTkgby1u/XMgDvXpPQGaN89AMpDdxrm/OcPQ57uyhy6AVX9whHT0mM5C+Ddpy 7Rx6fOc6hC7IugWPe3aKa6Zy4qwLfLNvCnS0BxGjC6vu1q53QhlegQ+I5tuQzqpq51Ga3Ig6InP8N HYs/8iP/ZEDj0DSFcZGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmIhM-007XYn-U4; Thu, 27 May 2021 16:17:30 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmHa7-0071u7-4D for linux-arm-kernel@lists.infradead.org; Thu, 27 May 2021 15:05:57 +0000 Received: by mail-qt1-x832.google.com with SMTP id h24so398983qtm.12 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=LszZa1KX39HqiSicXR9v9Z19ZvlDcxonyHlggfNujj4qea3a4kl8InhHZCd7HBAmT6 yU1JKe8lSRpY0MIIzbGuUIUI9rK0AaqUMIMiGdWE6nGR+cj6mRUPpyQN0bSzkT4m9Peo xGfA1TxbboamVz2ftEKqfhYM6jUlABRiH8/Axs17Bm2SUP2cLFoqdbUx+G8uJn9rT0Sb L05GxPnQ6im5Yzu2zHgbg/DoMkVyuV+yrl62O6SvT2ayRRhJjHYNCokRSB0kXV+JJR+c 1AJuDVRUEocVktKY2U1HISTbqAMJfPCC8cHI24/JrsQ/EYyrNSS57UkaYZORX+77qWga t2GQ== X-Gm-Message-State: AOAM531iLQ3W00mKkJB64/NJ4vMB4V+hC8f8feWezxHyfE5om0oYP3ZC 5QVy+OvyMJZroDiwkNXoUdkbcg== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210527_080555_190533_6BF5C900 X-CRM114-Status: GOOD ( 11.12 ) 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 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;