From patchwork Tue Jul 24 06:57:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 142689 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp6918083ljj; Mon, 23 Jul 2018 23:57:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfr0il6+T7ybPsvs9lSuCPA0v+PnVQXToX3oLNkaywgEDuweSCUiAQXpvXfcH8YzOCt4ac/ X-Received: by 2002:a63:1e66:: with SMTP id p38-v6mr15010727pgm.376.1532415454207; Mon, 23 Jul 2018 23:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532415454; cv=none; d=google.com; s=arc-20160816; b=R0x54C/1O5SqeizR2DPJTSFtjsbHk1whtEbW9ctjcJEBQx6omClc8RqWE8SkPkQP9o JITU7WyITK/DVgaJZbYW3wgLkWp7JD5qM0nWlt+c2a2H4pMQieg7dL1131BSGZ49dE7o LENYkTJOVgeyzt2oGoazv7ICnAzv3UjdzX+U5gyNrHK2vJQnbldzQpPUyAGlUMZ8y2x3 DYGiThMAnh2iMPTqtTZpQpXkhoYUv2XPy9n80Z61gUIGWS1FrLTioQjcfajw58h5pQ1s ysiXASFfVc4C4REZ+lui2lia9sX+I8hTnZgCWKNifs+3X8U6x4s/Cef9FyIrLDYGALYW nMNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=8ScyWDBSkpDCeiO9xWIrh9E1Li1NS358S3v+0v5j+T0=; b=IEc3oBup6jZ7TXKHijDwVoj8sZbf1FNbmOs8UZBndaUYuW0xamIrrawMysrFaRtkld TcwnW8E3DCEdihIsaGidXz/IkJJS0dP5fAD4/ED113mZ+Np8xS/bgK7UALzqNxaKALMm fqkUxCaivh8WAP7mGxjGymJLszScPzKr+vEmuxSSozd2wYbo4v5p7MjWHPUCsw7BouCM zrEoLUC7gyF7PaiHnioi6q3lI96MNkdmCrsMMEbwY1u3T77iyTgpOpWY128lJPr70FXr 9m1Jj/a7bZOVRy8vTHsZkwqkxC7qSQePPjKWkQZ1bslgTUQqarSNi8hOvLTnxjihqVvd HL4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iiggbw/Y"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n21-v6si10291541pgk.307.2018.07.23.23.57.33; Mon, 23 Jul 2018 23:57:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iiggbw/Y"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388453AbeGXIC2 (ORCPT + 31 others); Tue, 24 Jul 2018 04:02:28 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:39143 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388245AbeGXIC2 (ORCPT ); Tue, 24 Jul 2018 04:02:28 -0400 Received: by mail-pf1-f194.google.com with SMTP id j8-v6so621324pff.6 for ; Mon, 23 Jul 2018 23:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8ScyWDBSkpDCeiO9xWIrh9E1Li1NS358S3v+0v5j+T0=; b=iiggbw/YJZIAmCl7wpn67Ovdkz+pycG2Mg51R/BAaen71ZB0eRXijPEyRgy/mq7wcd vZuBl7F5EF5rXfpH1vpV/gyllE0ooG8GMxvKSqC0uAnU8aq9M42TGFGK7DAI3m1gVdH5 IQJsH+l9kVW4XYYkiCKC0zQ/frf8WjM9ggA+s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8ScyWDBSkpDCeiO9xWIrh9E1Li1NS358S3v+0v5j+T0=; b=RJqgzQNdJO+GFRyyQhqd/uWmeuEwIcuji3l9uUrcKzT9FxKmHydjnJXbcKGg0+l9kT ytUJ8e8YJiCeDyo6KGsOAqMVTh9Q8m4F1vKeIKSypf8wWAM5nOB1nSNw89aQ3uXcfS4C rxwDDOp7OCF+ssUkh63U7SuElmgY71nuGqnXpdVi0jFqZOY+hWrvwc68TPaAODUY2LeQ naxqFEuKdohYbMPlcVtt7d4idfIuSOC0ht+/5jyCLzxyEiwo5KvS2Nwa+2Nadht81DdB OmGoPzDx9BmiT+0z6uz44LnqsBQXCAPoSuUT2++poWe/OTEZ2b4r7km4xSaIcuZE1oAg o5Uw== X-Gm-Message-State: AOUpUlF6JoSCDq60SKEZdCwglyD5aKmvBkkaqiPBbwOIl/0/YR8v+g48 pUaWFwAXHwfE6ILU5DqL4df4iQ== X-Received: by 2002:a62:3601:: with SMTP id d1-v6mr16421214pfa.41.1532415450265; Mon, 23 Jul 2018 23:57:30 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id z19-v6sm2465351pgi.33.2018.07.23.23.57.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 23:57:29 -0700 (PDT) From: AKASHI Takahiro To: catalin.marinas@arm.com, will.deacon@arm.com, dhowells@redhat.com, vgoyal@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, dyoung@redhat.com, bhe@redhat.com, arnd@arndb.de, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com Cc: ard.biesheuvel@linaro.org, james.morse@arm.com, bhsharma@redhat.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [PATCH v12 03/16] s390, kexec_file: drop arch_kexec_mem_walk() Date: Tue, 24 Jul 2018 15:57:46 +0900 Message-Id: <20180724065759.19186-4-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180724065759.19186-1-takahiro.akashi@linaro.org> References: <20180724065759.19186-1-takahiro.akashi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since s390 already knows where to locate buffers, calling arch_kexec_mem_walk() has no sense. So we can just drop it as kbuf->mem indicates this while all other architectures sets it to 0 initially. This change is a preparatory work for the next patch, where all the variant memory walks, either on system resource or memblock, will be put in one common place so that it will satisfy all the architectures' need. Signed-off-by: AKASHI Takahiro Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Dave Young Cc: Vivek Goyal Cc: Baoquan He --- arch/s390/kernel/machine_kexec_file.c | 10 ---------- kernel/kexec_file.c | 4 ++++ 2 files changed, 4 insertions(+), 10 deletions(-) -- 2.18.0 Reviewed-by: Philipp Rudo diff --git a/arch/s390/kernel/machine_kexec_file.c b/arch/s390/kernel/machine_kexec_file.c index f413f57f8d20..32023b4f9dc0 100644 --- a/arch/s390/kernel/machine_kexec_file.c +++ b/arch/s390/kernel/machine_kexec_file.c @@ -134,16 +134,6 @@ int kexec_file_add_initrd(struct kimage *image, struct s390_load_data *data, return ret; } -/* - * The kernel is loaded to a fixed location. Turn off kexec_locate_mem_hole - * and provide kbuf->mem by hand. - */ -int arch_kexec_walk_mem(struct kexec_buf *kbuf, - int (*func)(struct resource *, void *)) -{ - return 1; -} - int arch_kexec_apply_relocations_add(struct purgatory_info *pi, Elf_Shdr *section, const Elf_Shdr *relsec, diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index 63c7ce1c0c3e..bf39df5e5bb9 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -534,6 +534,10 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf) { int ret; + /* Arch knows where to place */ + if (kbuf->mem) + return 0; + ret = arch_kexec_walk_mem(kbuf, locate_mem_hole_callback); return ret == 1 ? 0 : -EADDRNOTAVAIL;