Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1547570pxf; Fri, 19 Mar 2021 09:28:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzB6ZII9aTyVJIOh5sSxYhAol1j35CRIlv80X0QJcSwWBHLccXRleXcDzH45geELXE5p+iP X-Received: by 2002:a17:906:c005:: with SMTP id e5mr5311626ejz.270.1616171294016; Fri, 19 Mar 2021 09:28:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616171294; cv=none; d=google.com; s=arc-20160816; b=lroR8g+RNYjuQeOkbvo3Tz/2RyQTgbKwbrfVy8m5GFDc25duF6SsShIXobwCi/mJvl doJFNESXfApxBpisYKBItSIiLQqGnQDY+LYR9pdaJv0N62F855Cr2cMJNuL20IcIv/oi HHpKjupDwIG4yZO8j4//UwcJ5AYlqTNi33iQnHVBs/sGD2YU4wlhTKeywbao/IDkRCKD +t37nTaIrWpncY4PmNN4u3cRV0PBJTMlkm4qTOUiyjSyRKMzcG8xa4y7rFwSNvVb9s3D avmHGf9ga0ejRhXw8X/TCQMo/38Wp/NLnyKXIhiZlUn2/TbY+2Y4JlYVi38AdkrmN/HE yOvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=aiocf0WxxanLqyRsSiGwW/7Cm4F3BhhRyAtMPi0R2vI=; b=IvWYWmV8ksMn4yRmfFpFj/Zf1x2xMDvTuMO3JF+WWBV9LQSFRhwEjJcDtGTqyFvkHr l81tkLlffoPfPcp8H3x+EwXwQ3y0+EFiDd9VOWKKDzBP2IcZjmEe7gvGYjiMQYamZ9sC inmKcpqyVpDnuztTxuhkFRIBk0VouwwgxTYFiz3wi5QXCyjZMggyvIXmkZLU5IMRawY1 BngSFwGXN4lXdUZM8wogiz3PPY8dhE/0NFBxkxAzdP1jZbTmBRoS1z33w7v3t4Tezdo8 ykqBe2CYbwvB6BRzgUeLA0GxuQqbAvrGEMVEBAvJxl9TtCWRz2zt83P4wh9YrfpoW33w VKyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TzaZNCAA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si4520880edq.224.2021.03.19.09.27.50; Fri, 19 Mar 2021 09:28:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TzaZNCAA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230215AbhCSQYg (ORCPT + 99 others); Fri, 19 Mar 2021 12:24:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230136AbhCSQYJ (ORCPT ); Fri, 19 Mar 2021 12:24:09 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC4F3C06174A; Fri, 19 Mar 2021 09:24:08 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id x28so10886183lfu.6; Fri, 19 Mar 2021 09:24:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aiocf0WxxanLqyRsSiGwW/7Cm4F3BhhRyAtMPi0R2vI=; b=TzaZNCAAXCckxX0tMM0aaFF37YOMh9ipM3hGGzyTS6/K8X/SSQXu+Bk/VebuEH93n1 Tnjx5y69x4EQ0UqkqqUleADJcmpGcCsHW47Q+AXgQ6MGO6zn5REYobBHlYJ55bYZJNus g+siIdV9udUhO6akT178HZUdnyJIZoazUYR+4bT5oINQfn4t+0i+VLjvg9UH/N/4Rbch eSTTuo2x9t/tkuuiOUbXSijKAfkcEN4Hzk9ckkeQiFhj+FhBJ9mlOmbScDX70l9liNOh G1H3W8IFG0AeY2C/JsUvUwlH49YWsNBkeyiuDMGoQwe0k6TOgLGIepEYikU0+sVI7t8E YqGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aiocf0WxxanLqyRsSiGwW/7Cm4F3BhhRyAtMPi0R2vI=; b=CT8Im1yftsPLOocunJkAIxzv/saD/WyZI0YMzLsYT6S+E9LbSve8AnlGEmEs2TPYKw WusJda7HRBMqE56IaKMrOK7GqUmwMvkkv7im+eAB8054NBBHIJsZYCfJvCayDBo6uEQ/ bzeT2PApeyw1SQKDgLFk9oMXpdTWzKMqNdPLvbw6dYDUVnI6d3UqjPV1DtMBth9xO6gp fMKZD8MR/cXyaGv6Gk+phmrGuIKg5gfHU+V5PEIiH0Hvk4iGsLAiQeCJCRfwJx5/gnei JqBBjgxPIEytzAxld/JxXZhQrb/PkinIqNlZKQy/fJ4l/1kmVs9uVrpWC66g/Krsasxc dheg== X-Gm-Message-State: AOAM532H7Ms3iV/I6+qo+FfoAIdmjXcc1axx80TSHxuohLtRRE+tazXh WmbhrJTWKT+EwP5aiPhUCuasHwh891Y= X-Received: by 2002:ac2:4472:: with SMTP id y18mr1246047lfl.332.1616171047070; Fri, 19 Mar 2021 09:24:07 -0700 (PDT) Received: from [192.168.2.145] (109-252-193-52.dynamic.spd-mgts.ru. [109.252.193.52]) by smtp.googlemail.com with ESMTPSA id i3sm828675ljj.82.2021.03.19.09.24.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Mar 2021 09:24:06 -0700 (PDT) Subject: Re: [PATCH v4] mm: cma: support sysfs To: Greg Kroah-Hartman Cc: Minchan Kim , Andrew Morton , linux-mm , LKML , joaodias@google.com, willy@infradead.org, david@redhat.com, surenb@google.com, John Hubbard , Nicolas Chauvet , "linux-tegra@vger.kernel.org" References: <20210309062333.3216138-1-minchan@kernel.org> <33ec18ef-8652-643a-1a53-ff7c3caf4399@gmail.com> <78883205-e6da-5bc4-dcec-b6eb921567b1@gmail.com> From: Dmitry Osipenko Message-ID: <72db59eb-75dc-d1ed-7a83-17052e8f22a8@gmail.com> Date: Fri, 19 Mar 2021 19:24:05 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 19.03.2021 18:50, Greg Kroah-Hartman пишет: >> Then initialization order won't be a problem. > I don't understand the problem here, what is wrong with the patch as-is? The cma->stat is NULL at the time when CMA is used on ARM because cma->stat is initialized at the subsys level. This is the problem, apparently. > Also, watch out, if you only make the kobject dynamic, how are you going > to get backwards from the kobject to the values you want to send to > userspace in the show functions? Still there should be a wrapper around the kobj with a back reference to the cma entry. If you're suggesting that I should write a patch, then I may take a look at it later on. Although, I assume that Minchan could just correct this patch and re-push it to -next.