From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 37786C0650E for ; Mon, 1 Jul 2019 07:45:22 +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 0BE5E208E4 for ; Mon, 1 Jul 2019 07:45:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YUIoWwyG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BE5E208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UbsTx1S3t3yB+1tPMnstlu+BwcmMJ8G5fvretYfY2ko=; b=YUIoWwyGaz0kkD C2d8BxpJ2r4gwkUNfvkidPfksdp3LPg+LIjLNzRDeaXD+suScz/2dOahd7ShgqSGoHD57G+ezGz9+ eCWUrx2OD0RU8UkH+c3rMkqjmdDG2SlzLu3o3Hz+UBFHSTp17gMSq3W+vYOQPOG+qCOj1aOxGgLoK uwz8ncV/ReAlG6JJtCLpzfggvap1bA6y34ac5XrLHjLeaAqXltVslHW4Av7d1qgfX3GgC62HcRpHM Cl0/8GpBfKIEbwkFbCIGNayXhgn3A83lQKdSsug+2PBdrpa5tcPwEODoHayhdj3LEYoiw4fJMxPzR 8/CiH/K9rIHLYmLNalOQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhqzz-0005Lb-Nq; Mon, 01 Jul 2019 07:45:15 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhqzp-0004M8-Vb for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2019 07:45:07 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9C66EAE48; Mon, 1 Jul 2019 07:45:04 +0000 (UTC) Date: Mon, 1 Jul 2019 09:45:03 +0200 From: Michal Hocko To: David Hildenbrand Subject: Re: [PATCH v3 03/11] s390x/mm: Implement arch_remove_memory() Message-ID: <20190701074503.GD6376@dhcp22.suse.cz> References: <20190527111152.16324-1-david@redhat.com> <20190527111152.16324-4-david@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190527111152.16324-4-david@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190701_004506_674270_ABCCA6C6 X-CRM114-Status: GOOD ( 15.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oscar Salvador , linux-s390@vger.kernel.org, linux-ia64@vger.kernel.org, Vasily Gorbik , linux-sh@vger.kernel.org, Heiko Carstens , linux-kernel@vger.kernel.org, Wei Yang , linux-mm@kvack.org, Mike Rapoport , Martin Schwidefsky , Igor Mammedov , akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, Dan Williams , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon 27-05-19 13:11:44, David Hildenbrand wrote: > Will come in handy when wanting to handle errors after > arch_add_memory(). I do not understand this. Why do you add a code for something that is not possible on this HW (based on the comment - is it still valid btw?) > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Cc: Andrew Morton > Cc: Michal Hocko > Cc: Mike Rapoport > Cc: David Hildenbrand > Cc: Vasily Gorbik > Cc: Oscar Salvador > Signed-off-by: David Hildenbrand > --- > arch/s390/mm/init.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c > index d552e330fbcc..14955e0a9fcf 100644 > --- a/arch/s390/mm/init.c > +++ b/arch/s390/mm/init.c > @@ -243,12 +243,13 @@ int arch_add_memory(int nid, u64 start, u64 size, > void arch_remove_memory(int nid, u64 start, u64 size, > struct vmem_altmap *altmap) > { > - /* > - * There is no hardware or firmware interface which could trigger a > - * hot memory remove on s390. So there is nothing that needs to be > - * implemented. > - */ > - BUG(); > + unsigned long start_pfn = start >> PAGE_SHIFT; > + unsigned long nr_pages = size >> PAGE_SHIFT; > + struct zone *zone; > + > + zone = page_zone(pfn_to_page(start_pfn)); > + __remove_pages(zone, start_pfn, nr_pages, altmap); > + vmem_remove_mapping(start, size); > } > #endif > #endif /* CONFIG_MEMORY_HOTPLUG */ > -- > 2.20.1 > -- Michal Hocko SUSE Labs _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel