From patchwork Wed Jun 9 00:44:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12308501 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.9 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,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 F1D32C4743D for ; Wed, 9 Jun 2021 00:50:57 +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 B263C6124B for ; Wed, 9 Jun 2021 00:50:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B263C6124B 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=qymwVeS4o3E/1ZRxKI/I3gE4SVJmC8PvSCXxADuufcY=; b=eXWIUR9mMrKr+z Hbaiu7mVR9j6F9Gb0SnNAjZo9G/cWrvkdtX4jkV0pfY5T3lumiE+dy7JYoNPvys3G2oug14LW8AfH 3NnQERljqmSWTRjzjGqv9zr0zgS0G9PTYho9CFUk9uSyJZV9fPDQRE9lUTSukGqkjzPtA7/rLf+K4 uolIjXnAn9fS+SZFpvtHTYXSupkioriZjYKncFi79mMEF1WBHaVPXbKM67kJkA4/RL4xfkiA9QxQt sfXaq/YARA34kSbO6vkLklz1JPLqWv6K3f6lo84h3zP1YT4Q9VUAIzRgndcoh4FUrJ6t4LX55d9jX Z3Z+MnvAopXwC+QhgCsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqmMR-00Aw0o-G3; Wed, 09 Jun 2021 00:46:23 +0000 Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqmKn-00AvCb-0G for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 00:44:43 +0000 Received: by mail-qv1-xf30.google.com with SMTP id if15so1077975qvb.2 for ; Tue, 08 Jun 2021 17:44:40 -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=vcjYajrJXv/lTpIFROIc3rQPTqnw03xFW9e2NsWvMmk=; b=SgxuxwSh4m1h9hRbLSuPfBWqYm1As0EuKsoebPFcfd02FoFxpOL3mT49jSoUnPLaoY xXYMG+tTO3C+N7O2Oa8tDi6s3ZDHgA3UT3Zd6sJ4IAddJ8riUwdeXtuSRY8OeoY6B9bN Qvg/1asVoH690WnwI+WVu/qNQPr848I0tiZ0Cyc8bOt5OyMCHQO+FBh4aacOcfQj6fDb ImY6AVSlcszk63W/OPJ/U1o/2NdSKg0m/IOcyH415Qun96VY7uwVn4/mZTzN4O/gXnVz aus3TnuWpj+obaFwUe1jmETnpKTJh9r58mmHR1KQwsYmxORiX/pUvrT1lCDV6ddrY1uo LOzA== 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=vcjYajrJXv/lTpIFROIc3rQPTqnw03xFW9e2NsWvMmk=; b=W/im84/Z5c6lNZGmNlo9Eb1lTXCWOs+mZ+z3t+37fxn6v4cxkVAzWvHAiR6pTJfQNs 02ErByGmzM6/KuqsDw74o6J3Srpc6Q8JLUR4hXK6FvHyIUsF3oQIWO+fVD0S92ZWUonY 0r4ABLMkRsT07qdKpXNKvmMjGUxXE5MtLM+bnlmNCkTExfrQ33xW3Nku0sVovdrJvkqs 2wDcQESp5XMjigoFFut917lJfKNY7coqKB4FcwlhV71hGXGpD9SE+SGKsXwfW3td0+aI OP0XaT4nZCG7PMYpcthWS15tYWwV7fjhALRPaLCTJ5fHX5fCySjJ7Ovh+mLeLLsrw1XJ 1gLg== X-Gm-Message-State: AOAM5321KiYIW1LwHbAaIi8+o7gWxyLYmZIYa7H4PdRIbIwIXd2bL5mf Illd1wLMsHp5S+RMcDGEuHdXiQ== X-Google-Smtp-Source: ABdhPJwHZbV81EmFC6ZnIEtukl3+Va3nM0ikxHKwWsJt6Ayst+Mc2MnTDU4ZHzbTNSVXncCD8AXVhw== X-Received: by 2002:a05:6214:21c8:: with SMTP id d8mr3294306qvh.35.1623199480026; Tue, 08 Jun 2021 17:44:40 -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 n194sm12869011qka.66.2021.06.08.17.44.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 17:44:39 -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 v15 13/15] arm64: kexec: remove the pre-kexec PoC maintenance Date: Tue, 8 Jun 2021 20:44:17 -0400 Message-Id: <20210609004419.936873-14-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210609004419.936873-1-pasha.tatashin@soleen.com> References: <20210609004419.936873-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-20210608_174441_102193_90517649 X-CRM114-Status: GOOD ( 11.33 ) 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. Suggested-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 a2163ea24fc1..8f8962f53ba2 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;