From patchwork Wed Mar 3 00:22:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12113659 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 6124EC433DB for ; Wed, 3 Mar 2021 15:10:32 +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 DF8E164EE1 for ; Wed, 3 Mar 2021 15:10:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF8E164EE1 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=HWMraG2Uviphda3izssPX2bzI qkpz78KygZB4TJ+reK+hST313AXpv1jbuIDzj8GYnnGLxzpHmOTbDbFCmI4nJJAsdhMOG78W9Er6F G6XVJlPLoM9mTj1bO0WMsYWaudtIDMTRJa27ykv78qqZIrpZws5HtAIceLzfX6bxwdNbIMskkCaR/ bEeS5tJLVs2+YITYpJSvxx2m20y4FdI//NikCSET+EEWSWKt6F548UpvCLfbc7WtT1QvXqDRG4d3L YwxJtneObsi3dj4xKOZugYcAy3rE0IOL5lmCE8w0Sv+sTZiyMZshjpHZbdDVyPvaSNSoe3YC4uiBU 3yhPmtFrg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHT6K-005J0G-4K; Wed, 03 Mar 2021 15:07:49 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHSBx-0054aJ-Jx for linux-arm-kernel@desiato.infradead.org; Wed, 03 Mar 2021 14:09:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: Content-Type:Content-ID:Content-Description; bh=mQmK3SsBkKt3YHt5HRugbQ4C32Fw5itH9aDNQf+nmJI=; b=S1HFPR+Dxfysb6gqJV7/Bfp6t0 FCGQ/RMwq4WcqIBOBZeDiaTyG6T8slYVm8Mx0ItKa5p4v1qlBtsCZ4yx4JXck0bm/jsq1HwDMudhr BGJ1y5x4SoEgCqL49HwjP4ps0iLZnp7G5HXLDa3DxgJ3UOT0jjwFJb4o20y92+qFOgMZPaYg0j0BK 0FRRKYHydTgh3b8S0wB5TZIEpBFRn4iQlV76KrtNOlGCVav+hd2uzc9KrKfJVI0pGqqktIYkq3pEb hSQRfgT/aqePsXJwLbmR+IFuqIRtkOrgzGt+t1LCZiluzw2zSxpuUfxl7xU+CuXccmu0XbRq9IUhf FhLNsFjA==; Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHFRn-000kwO-Oi for linux-arm-kernel@lists.infradead.org; Wed, 03 Mar 2021 00:33:06 +0000 Received: by mail-qt1-x833.google.com with SMTP id b3so16255939qtj.10 for ; Tue, 02 Mar 2021 16:33:03 -0800 (PST) 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=cbwp13Q2ddpME4q7SnIYDmvYSLO9Ch0h6chGS0mJcuKYrVSiyW9RqugBaVOLREGq/3 RaXjQUi+1f2H7Dq7uhH7XbTZd4G8/Xc+rFwYUEEx/AdUSO30WgYG1LUfV2w1G6wCcjc2 /8GAhHNr0K4pH8SgFuD2VradryKueR66b6D+IX/xPN+SlF18R9pC4oMGtJaJMn5wE4eO 2KXKyC3D/rElN2+qfLl+X13RT9wKObgzzMT/qtKkvQmWMY9NClwSB/YVP+mMnf17tCpK BcdzbAKBOoD7Tz3sqa63lxj0/n8gza47BWFQQyLZKmLhuN8xvSXm97fDqDAG6jrXOUvD BH8A== 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=eHRma9Y69psTqhzyD5tAhwKVkgnM7rjQutqGtT+GI+j1nhZuo8VGln5KI4NuF0mOwV 0NYy8wOVkn8o29lOArLZYctlkY9NRfRn36QLL5XgOtDPTgjAyXpCm3PdDfp1IHm2vimb PwFxi5HFzF5er+/l4AjUATZF8e/hTEAnQMcNcCF1ieD1ZmpeAvAXUC/O7NDHuuuqBti3 L7xoy6nmxGCB0EtmmYhmiUbY5LUQaTluu4NYzO8Kyda0veyCsfW2XdIKubtuVXx0uSAI 5MxzYUkj23bxR28kT6+ttu4M1V+yhYnDx13+7yqXXvzIENkhOFIFFwRpUmSTlNb36ma1 YKrw== X-Gm-Message-State: AOAM530xmosVobdCsWb6ZoP0IUTWnI5+P0zDAE7yOnwmn8wyLSfv5+61 zIcLlKieozpukIR//ehtZpaGR8hyxtS2cg== X-Google-Smtp-Source: ABdhPJzDM5pLJqM5foQKA752jyI+AxEsX2Dhp+xecxEILxLFKkHZG6f5Ei6Ery303Y4YtrOKPjg5sg== X-Received: by 2002:ac8:72cf:: with SMTP id o15mr15747863qtp.118.1614730973753; Tue, 02 Mar 2021 16:22:53 -0800 (PST) Received: from localhost.localdomain (c-73-69-118-222.hsd1.nh.comcast.net. [73.69.118.222]) by smtp.gmail.com with ESMTPSA id r3sm16690512qkm.129.2021.03.02.16.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 16:22:53 -0800 (PST) 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 Subject: [PATCH v12 16/17] arm64: kexec: remove the pre-kexec PoC maintenance Date: Tue, 2 Mar 2021 19:22:29 -0500 Message-Id: <20210303002230.1083176-17-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210303002230.1083176-1-pasha.tatashin@soleen.com> References: <20210303002230.1083176-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-20210303_003306_578485_35E4D4DD X-CRM114-Status: GOOD ( 10.95 ) 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;