From patchwork Thu Sep 30 14:31:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12528561 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7291C433EF for ; Thu, 30 Sep 2021 14:42:56 +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 7FF1A61A0A for ; Thu, 30 Sep 2021 14:42:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7FF1A61A0A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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=YfA6s5WHeBEKjlQiuOb7RHoKy4Rt9yMFV4C/YqUtM/c=; b=sMHgIo68FAvYcs +By2QzTmevh/2VniFvVkdG3Tlftqzl19xl+tMl24LmwXS1rH0FzcJZkgUI706hFmMB+xJY2IMwAaD 7TVuOby0n7MkEn6dnX2ugDkXGRSfqSru1gPLbU60NXwnBNOceNcScyayCIwDcsYYPpoLUbiDk+Swy OyQRer/SBTte2QLKVe0WV9QTO7dB8ACJ7RE9vQkWzXVIectuAY9VL4xAlwx371Srh8MrU9yy5MpwP 6z1q09g6PQKR85OYNtBiJsQi4LFOqTWH9lwPKxMkkhIYyOEsmOTRCkQAM86uDuiDQjPBZnJVeQFam I6JWkBTv9meiF7J/rTeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVxE5-00ElPl-Qs; Thu, 30 Sep 2021 14:39:59 +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 1mVx5u-00EhWb-Vq for linux-arm-kernel@lists.infradead.org; Thu, 30 Sep 2021 14:31:37 +0000 Received: by mail-qv1-xf30.google.com with SMTP id a14so3684195qvb.6 for ; Thu, 30 Sep 2021 07:31:30 -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=5Swv6lplDzjvDpp+CqlYUWQ4CihY4pr+PdPAAcX6X0k=; b=QIl+s6AgZb/E9V+qFkaJv28iDbmNKtriCkBKOedA+vTjWGPQUHwOWsSN82vUhYFDPa aKGX8pbht4XajcOxe9AsUPnPHyFeMsy53kNmxOp3NUiw7gCTOFbJHD2xFmkobfsYc6tc +a3sdvCpBBLPEhOdR01yAiMVZgRcqbM5QUcmBf0qkoXY2cJCdwNF4UEA2JfG0IDurSJL wCqpUukwDUB5zPuu1BM5g/ZOGHHARNjAM79AbZES71bLfS3MSsmn1x/xQsLYN7rTb6s9 X7JRzwlBTy1hpr+G/1SwuZkqioteecdFDqEFHGew47hr8gs54RBmUJ+WmmZ3E1UZGl1E MNFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5Swv6lplDzjvDpp+CqlYUWQ4CihY4pr+PdPAAcX6X0k=; b=SU4XQEHgObEYphqBbpMa6PQP19k7YCr8ezUrd+r29UlZNch44DaG6CDi/miTGGlhuU jjLv8IEewRtAcXkfE95P/TL6grGrwXxww40MGOALfov94GTdxh1mGs4AYnIN7wCv2/ul 4iaVon33OGHSMqiMi859d1zjpyeqCx7/3LLueq9GmRs8Gx271DPGfPrR0sEy1eeHH8Ss e8vUqK5UQEJD1qpaQCdqWvta1xDdxzkc5WV8I3kwEeCsCN1fjrpo1+eMmO8dG3Brb30+ OCYb5pTHyeZy4j8i8qg8lGL9dYSVwsv9RtSGG5DXMQGbkISR1FYOi9YRccUBJ61jnJKY Y0fg== X-Gm-Message-State: AOAM531I895WXzHXsg8krZe0E1J3VQwdOzuLgxCBs2c0Mge9y3NPcOS9 yRGGRpIczdiFTLrbxPeGFU1RTg== X-Google-Smtp-Source: ABdhPJxh6s/187JmlvOIcH5ROC+cTxyh2kXDCoA5lkqv5O44XaWCE6Q0LOi1e6FSLI9Y930/MBRD8A== X-Received: by 2002:a05:6214:1427:: with SMTP id o7mr5627954qvx.45.1633012289388; Thu, 30 Sep 2021 07:31:29 -0700 (PDT) Received: from soleen.c.googlers.com.com (189.216.85.34.bc.googleusercontent.com. [34.85.216.189]) by smtp.gmail.com with ESMTPSA id l195sm1528731qke.98.2021.09.30.07.31.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 07:31:28 -0700 (PDT) From: Pasha Tatashin To: pasha.tatashin@soleen.com, 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, kernelfans@gmail.com, akpm@linux-foundation.org Subject: [PATCH v18 13/15] arm64: kexec: remove the pre-kexec PoC maintenance Date: Thu, 30 Sep 2021 14:31:11 +0000 Message-Id: <20210930143113.1502553-14-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.33.0.800.g4c38ced690-goog In-Reply-To: <20210930143113.1502553-1-pasha.tatashin@soleen.com> References: <20210930143113.1502553-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-20210930_073131_066396_F13035A1 X-CRM114-Status: GOOD ( 11.36 ) 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: Pasha Tatashin Acked-by: Catalin Marinas --- arch/arm64/kernel/machine_kexec.c | 43 ------------------------------- 1 file changed, 43 deletions(-) diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c index 1e9a2a45e016..559d47a3c59c 100644 --- a/arch/arm64/kernel/machine_kexec.c +++ b/arch/arm64/kernel/machine_kexec.c @@ -77,48 +77,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; - - dcache_clean_inval_poc((unsigned long)kimage, - (unsigned long)kimage + sizeof(*kimage)); - - for (entry = &kimage->head; ; entry++) { - unsigned int flag; - unsigned long addr; - - /* flush the list entries. */ - dcache_clean_inval_poc((unsigned long)entry, - (unsigned long)entry + - sizeof(kimage_entry_t)); - - flag = *entry & IND_FLAGS; - if (flag == IND_DONE) - break; - - addr = (unsigned long)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. */ - dcache_clean_inval_poc(addr, addr + PAGE_SIZE); - break; - case IND_DESTINATION: - break; - default: - BUG(); - } - } -} - /** * kexec_segment_flush - Helper to flush the kimage segments to PoC. */ @@ -207,7 +165,6 @@ int machine_kexec_post_load(struct kimage *kimage) (unsigned long)reloc_code + reloc_size); icache_inval_pou((uintptr_t)reloc_code, (uintptr_t)reloc_code + reloc_size); - kexec_list_flush(kimage); kexec_image_info(kimage); return 0;