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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 B0088C1B08C for ; Thu, 15 Jul 2021 09:35:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B159613B5 for ; Thu, 15 Jul 2021 09:35:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230314AbhGOJiP (ORCPT ); Thu, 15 Jul 2021 05:38:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236202AbhGOJiO (ORCPT ); Thu, 15 Jul 2021 05:38:14 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 336BEC061760 for ; Thu, 15 Jul 2021 02:35:21 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id p22so4636739pfh.8 for ; Thu, 15 Jul 2021 02:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QXkiqMT/glRYwyHPQoyx3aDo7nh/1KZKgmUiqtcAPDY=; b=MzDY4nkv0QsPl3RRx5bPYDTbkke6SLjvc2oe/RSnFjWPoG5T8dKKOpymsgn9qnMEo5 sHqxBMigOcqDJef4hC+9JXoGQOaC8weUX9BDwb4LL9Bd7P0Krz13fdt/z7yzOy3r9d5S rG3d/tO8xgT4XztexfXgIp3IDYBeGN9W+twCbHxAaE97054zyI195LlstTaa9miNyIXM ZtVHwqJ28F/LP7I/1SsMcG0zjwTSwJpQ0xkHBDByyigddb4j1A3R2obUCxlnJQF5ykQN Ztp7XfV6waqivs0muPAXuxlF2/iTY49SqqzHdAHr2xrNm0uZ88d8P0soxXfEf0udttiW YxVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QXkiqMT/glRYwyHPQoyx3aDo7nh/1KZKgmUiqtcAPDY=; b=gQe3l7iowuyRlRKA8y2rIDCrV9DuBN5PKv2Xtugpcyo2xAJGc09mKDLESnIaXRGIKO yZcgt98d25eDFpEgIPZg1aHMGE+RvnvaMtZ0dm47OKRMjz0OMevQA2VrczJ0SCfFN1D8 TfQGIxyFljBYfFV2d0aEzzzU5PBDbmQyHUyBEcevJehRr4YKp0IL1CT0NRviEei+DTQr +251lwnO1r4xOOuEPsmGZlEe5zNlocV9iflQ4GitFeizmUijswoe1zQpHMNO5CsQd93P Pr6MmJLbrA9lIPjsry7v3eZEKDHawdnBApEFgCB1IE/lXEfW9or3Ah53ltpiSViOJVwe svGQ== X-Gm-Message-State: AOAM531WqLLV4cmQnNi0GduRpJpTOJvVgZ9FgMD52mmBLKTqgyGtvUJ6 b3SGYXN3ajPJ7c2ex/sCHh6Ga2fMqU+WpXUtvGpS2w== X-Google-Smtp-Source: ABdhPJy2uQJqyr3RFS9AkYE3fVuTqbnURkqwNQ1RLEW+9aA5TH6NCB5ZJZS9dFUK64ivUOQm56b4e/NNJvAz5zqRy3A= X-Received: by 2002:a05:6a00:1508:b029:332:3aab:d842 with SMTP id q8-20020a056a001508b02903323aabd842mr3528446pfu.59.1626341720657; Thu, 15 Jul 2021 02:35:20 -0700 (PDT) MIME-Version: 1.0 References: <20210712124052.26491-1-david@redhat.com> <20210712124052.26491-2-david@redhat.com> In-Reply-To: <20210712124052.26491-2-david@redhat.com> From: Muchun Song Date: Thu, 15 Jul 2021 17:34:44 +0800 Message-ID: Subject: Re: [PATCH v1 1/4] mm/memory_hotplug: use "unsigned long" for PFN in zone_for_pfn_range() To: David Hildenbrand Cc: LKML , Linux Memory Management List , Andrew Morton , Vitaly Kuznetsov , "Michael S. Tsirkin" , Jason Wang , Pankaj Gupta , Wei Yang , Oscar Salvador , Michal Hocko , Dan Williams , Anshuman Khandual , Dave Hansen , Vlastimil Babka , Mike Rapoport , "Rafael J. Wysocki" , Len Brown , Pavel Tatashin , Heiko Carstens , Michael Ellerman , Catalin Marinas , virtualization@lists.linux-foundation.org, linux-acpi@vger.kernel.org, Andy Lutomirski , "Aneesh Kumar K.V" , Anton Blanchard , Ard Biesheuvel , Baoquan He , Benjamin Herrenschmidt , Borislav Petkov , Christian Borntraeger , Christophe Leroy , Dave Jiang , "H. Peter Anvin" , Ingo Molnar , Jia He , Joe Perches , Kefeng Wang , Laurent Dufour , Michel Lespinasse , Nathan Lynch , Nicholas Piggin , Paul Mackerras , Peter Zijlstra , Pierre Morel , "Rafael J. Wysocki" , Rich Felker , Scott Cheloha , Sergei Trofimovich , Thiago Jung Bauermann , Thomas Gleixner , Vasily Gorbik , Vishal Verma , Will Deacon , Yoshinori Sato Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Mon, Jul 12, 2021 at 8:42 PM David Hildenbrand wrote: > > Checkpatch complained on a follow-up patch that we are using "unsigned" > here, which defaults to "unsigned int" and checkpatch is correct. > > Use "unsigned long" instead, just as we do in other places when handling > PFNs. This can bite us once we have physical addresses in the range of > multiple TB. > > Fixes: e5e689302633 ("mm, memory_hotplug: display allowed zones in the preferred ordering") > Signed-off-by: David Hildenbrand Reviewed-by: Muchun Song 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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 428A7C07E96 for ; Thu, 15 Jul 2021 09:35:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E83A1613A9 for ; Thu, 15 Jul 2021 09:35:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E83A1613A9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2C86E8D00A8; Thu, 15 Jul 2021 05:35:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2520D8D0065; Thu, 15 Jul 2021 05:35:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0A4658D00A8; Thu, 15 Jul 2021 05:35:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0043.hostedemail.com [216.40.44.43]) by kanga.kvack.org (Postfix) with ESMTP id D1EB58D0065 for ; Thu, 15 Jul 2021 05:35:23 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A0160184AE5CD for ; Thu, 15 Jul 2021 09:35:22 +0000 (UTC) X-FDA: 78364314084.16.AEB3414 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by imf17.hostedemail.com (Postfix) with ESMTP id E2C39F002095 for ; Thu, 15 Jul 2021 09:35:21 +0000 (UTC) Received: by mail-pg1-f182.google.com with SMTP id s18so5474855pgg.8 for ; Thu, 15 Jul 2021 02:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QXkiqMT/glRYwyHPQoyx3aDo7nh/1KZKgmUiqtcAPDY=; b=MzDY4nkv0QsPl3RRx5bPYDTbkke6SLjvc2oe/RSnFjWPoG5T8dKKOpymsgn9qnMEo5 sHqxBMigOcqDJef4hC+9JXoGQOaC8weUX9BDwb4LL9Bd7P0Krz13fdt/z7yzOy3r9d5S rG3d/tO8xgT4XztexfXgIp3IDYBeGN9W+twCbHxAaE97054zyI195LlstTaa9miNyIXM ZtVHwqJ28F/LP7I/1SsMcG0zjwTSwJpQ0xkHBDByyigddb4j1A3R2obUCxlnJQF5ykQN Ztp7XfV6waqivs0muPAXuxlF2/iTY49SqqzHdAHr2xrNm0uZ88d8P0soxXfEf0udttiW YxVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QXkiqMT/glRYwyHPQoyx3aDo7nh/1KZKgmUiqtcAPDY=; b=KJgCc4dxbMc/jvOKE9u+xFoDweYfR2roPhTO9ZgDS27VGLBoe82E849Zny594q1sQp RsOahjjk297X8GsEqfM0Dw3vHmwjfim1gfliEOzgdYKRgNqLjDAWnJtNfFQRYImAmgdC Ez2UKMc8YmgHvKjkk/PlPZFlNxVq19Da7ML65VCNugRLdgGfHc9VYmY+UsgVLwkDlwUC BW3cOZsM8MLEXLOecJnwbaZaWRnxoz9TdoScwg9mA01nYbkH5nJ7L9nY2sbj+bn/52Z5 vTbY0yPFE/gLRHkbfk210PEI+8+NoiLErotM1OiX99ZOUbAIiGjh1HgO93Ewj0J4ADfr zbcw== X-Gm-Message-State: AOAM530eAYhKurT+npklDOwUTNeEw6YK7La+t4AEaXKAEJHTRGurIiKX xOElImoPr9mqFM5wy8UjwdmABPPLrEKKPvmiXx6g1w== X-Google-Smtp-Source: ABdhPJy2uQJqyr3RFS9AkYE3fVuTqbnURkqwNQ1RLEW+9aA5TH6NCB5ZJZS9dFUK64ivUOQm56b4e/NNJvAz5zqRy3A= X-Received: by 2002:a05:6a00:1508:b029:332:3aab:d842 with SMTP id q8-20020a056a001508b02903323aabd842mr3528446pfu.59.1626341720657; Thu, 15 Jul 2021 02:35:20 -0700 (PDT) MIME-Version: 1.0 References: <20210712124052.26491-1-david@redhat.com> <20210712124052.26491-2-david@redhat.com> In-Reply-To: <20210712124052.26491-2-david@redhat.com> From: Muchun Song Date: Thu, 15 Jul 2021 17:34:44 +0800 Message-ID: Subject: Re: [PATCH v1 1/4] mm/memory_hotplug: use "unsigned long" for PFN in zone_for_pfn_range() To: David Hildenbrand Cc: LKML , Linux Memory Management List , Andrew Morton , Vitaly Kuznetsov , "Michael S. Tsirkin" , Jason Wang , Pankaj Gupta , Wei Yang , Oscar Salvador , Michal Hocko , Dan Williams , Anshuman Khandual , Dave Hansen , Vlastimil Babka , Mike Rapoport , "Rafael J. Wysocki" , Len Brown , Pavel Tatashin , Heiko Carstens , Michael Ellerman , Catalin Marinas , virtualization@lists.linux-foundation.org, linux-acpi@vger.kernel.org, Andy Lutomirski , "Aneesh Kumar K.V" , Anton Blanchard , Ard Biesheuvel , Baoquan He , Benjamin Herrenschmidt , Borislav Petkov , Christian Borntraeger , Christophe Leroy , Dave Jiang , "H. Peter Anvin" , Ingo Molnar , Jia He , Joe Perches , Kefeng Wang , Laurent Dufour , Michel Lespinasse , Nathan Lynch , Nicholas Piggin , Paul Mackerras , Peter Zijlstra , Pierre Morel , "Rafael J. Wysocki" , Rich Felker , Scott Cheloha , Sergei Trofimovich , Thiago Jung Bauermann , Thomas Gleixner , Vasily Gorbik , Vishal Verma , Will Deacon , Yoshinori Sato Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: E2C39F002095 X-Stat-Signature: kh8xnekw678ykyqxo4mb1wogg36mn9sy Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=MzDY4nkv; spf=pass (imf17.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.215.182 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com; dmarc=pass (policy=none) header.from=bytedance.com X-HE-Tag: 1626341721-305290 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: On Mon, Jul 12, 2021 at 8:42 PM David Hildenbrand wrote: > > Checkpatch complained on a follow-up patch that we are using "unsigned" > here, which defaults to "unsigned int" and checkpatch is correct. > > Use "unsigned long" instead, just as we do in other places when handling > PFNs. This can bite us once we have physical addresses in the range of > multiple TB. > > Fixes: e5e689302633 ("mm, memory_hotplug: display allowed zones in the preferred ordering") > Signed-off-by: David Hildenbrand Reviewed-by: Muchun Song