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: 12308479 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,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 F07FAC48BCF for ; Wed, 9 Jun 2021 00:44:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AAF81613B9 for ; Wed, 9 Jun 2021 00:44:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AAF81613B9 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 4DBD36B0082; Tue, 8 Jun 2021 20:44:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A5846B0088; Tue, 8 Jun 2021 20:44:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B9686B0085; Tue, 8 Jun 2021 20:44:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0195.hostedemail.com [216.40.44.195]) by kanga.kvack.org (Postfix) with ESMTP id BD9026B0083 for ; Tue, 8 Jun 2021 20:44:42 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D026B8249980 for ; Wed, 9 Jun 2021 00:44:40 +0000 (UTC) X-FDA: 78232339920.16.E8E0395 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) by imf06.hostedemail.com (Postfix) with ESMTP id 2AF70C0042C0 for ; Wed, 9 Jun 2021 00:44:37 +0000 (UTC) Received: by mail-qv1-f49.google.com with SMTP id e18so11903680qvm.10 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=IFgQqbHk4W6M1Ix/N1edx3Ph37Gdg1gsBwRlMNoeCkA6Z960IVmQJm3Lx8lm7otyzx X3knlmH+hgM+aQWt+8fNqlPmqwzugYZPwsxMwjVfJb7Sx4fkSqU4nwJsgGgdhG3mESHA I3Poj42JCM0tnOkvfU03/IEKZsFV5ftWBero2N3qgL3IZaYBpeay3uECJeL5OK9lR+dC vjzZbohyGoa1MlYN6A5qiEjx4IhouvoH2WBVBD7om3B7q+s48hhZ+mcsOxOSRxjyWRL1 yvBqj9ZoG2u93roZRezQueLgw8Wt9ND97ZDKoV17L+fflUA5ucOz34H5bs6j/aqGAwq8 Lrcw== X-Gm-Message-State: AOAM533jJaLR0HNdx1LTEiidfLpLmqSK47wDM1rSZKmmQmOgVEA9ZRgC IcYjhtxYo0/dZEV9OriO5SA8ew== 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 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=SgxuxwSh; spf=pass (imf06.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.219.49 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 2AF70C0042C0 X-Stat-Signature: 1mkp5g3gk8s8rc7zh3zjfxknar8t6y7e X-HE-Tag: 1623199477-495497 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. 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;