From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A0411990BA for ; Mon, 23 Sep 2024 13:39:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727098789; cv=none; b=Ip0UlrPiWzzqG3jBW1P9SJuZaEUkWYsS0YYBy2RbuYqSpx3uSQHprEJsqAB0DfkaF0MTlyUqC/omkwbvp0OC9JJ5RgrgxAHCXqRsRNRVyMx83UMLbXIq/opBZvCY3te0F3h43RelKVQcLQb3RmmTeZ/FUnbxx3zl/+sN3QV87CM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727098789; c=relaxed/simple; bh=sEwrlgig42rKnNlBMmsNfYi2JMxzx+5CL6WsYZmB7Ug=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AFFzyNCPVJaHwi/51cS49w/VWBRaeEGnfWLxcpCBfh5XBEdvyn9Y72zSEyXpvLflxT0oL7qKx+ZLAkfp3REVP/zXd7ORrU+6EvtqwHf56xozWHxpGr+REMGJgqk+biuv+UG+lvnn69emyC+eCHXOn4XJd1PlA43HBJ0LU/fHLmo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EywIhy+1; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EywIhy+1" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2055f630934so37195305ad.1 for ; Mon, 23 Sep 2024 06:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727098786; x=1727703586; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=p2yrEemLgwYknTm6OxcZK/C46/zY6aNqnZz/q471sfc=; b=EywIhy+1QX3FZ1C+0BHH99hqVTky68NSa4sZFcKabYSAP9VTNM+F/UUVvAOD9OiH/s lzKxgW0ve/4SMLUPIy6UdRTw0tsD4Y8bAHgSWgXX/ryLU2hq4960vsMzMTXd4RdcYPPa Nx1jzQRXhFuziy52Csfuit7w0/oi3FQXRdEW4a+EKBWoc7XCw2vTc0eEMQ6UCgt1puvy bPMNWeAGTdrGxQ4Nb1at8/3krVkdkqJe9zrXgPEfWa58m5JwVfGCwHT9FFlweeB5ivzV oTwxW4dQlqA6Qib0eNjKpoZgpLq5mXAShXMg0g6fvZVvhPlYhQHMP3Jr5SV0R0deSEiR 109g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727098786; x=1727703586; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=p2yrEemLgwYknTm6OxcZK/C46/zY6aNqnZz/q471sfc=; b=iJsLC080hcECjACfmV678cSaK2Rb/raLvjMElg3EwmdSQ81yaO0La6b17eowFQbmjZ vp67dHsMQXs8hye+YjVEzUF78ZOVM4K6YSzvg8klv/oIBnPKO7gvrRz3DxpguDCM+eNa 5qUEtgJp3ejgmLkz5u1wsuXTD9TuJPVtgUK2Md9EfziqNcFXoXiXv9Pk13Z+I2+6jnc3 jnqwbud4mDYrEViIET8Zp/abq/aR9ZRFzC0Tuc2AEHkT3JXCbgIx5By9luzZ784f3KRY tmD6lpk/033xWlP4CH+7VCfhYHYcHAX+66fqN5/A2PY6FWGx8IknzhC/02foHWBu5e1m YPaQ== X-Forwarded-Encrypted: i=1; AJvYcCVv8+thk8nfH2Zpz3DDe8+TRuRHgAoxV1oBZZjCWS42SfJN2ytpF/TS58YkJjgx77+Maydng0fbsvPX3xI=@vger.kernel.org X-Gm-Message-State: AOJu0Yw+3dMn7RFzZ2xeFHa8xDLt/3gagn7AfcTnxIEocuN2eniBX+3h hfA3TT43hVOvjAlhpVPCY3Y8W97mqYfWAtjWiB9ATIaxSwh0s90W X-Google-Smtp-Source: AGHT+IEid5hy1ANnTmLo2sO8vL88FFHzJ4ZmM3RPT8kW3wOf3CeFxPAKj18m/0Ic0vmS8h9jS3vyHw== X-Received: by 2002:a17:902:e54c:b0:206:ac4b:8157 with SMTP id d9443c01a7336-208d83ade61mr167279295ad.31.1727098785749; Mon, 23 Sep 2024 06:39:45 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20794702759sm132848805ad.207.2024.09.23.06.39.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Sep 2024 06:39:44 -0700 (PDT) Sender: Guenter Roeck Message-ID: <435dc218-f7ea-4697-b3ef-6a786e8d1b2c@roeck-us.net> Date: Mon, 23 Sep 2024 06:39:43 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] resource, kunit: add dependency on SPARSEMEM To: Geert Uytterhoeven Cc: Andrew Morton , linux-kernel@vger.kernel.org, Huang Ying References: <20240922225041.603186-1-linux@roeck-us.net> Content-Language: en-US From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W8Vk BIsJMaWOhks//7d92Uf3EArDlDShwR2+D+AMon8NULuLBHiEUQARAQABzTJHdWVudGVyIFJv ZWNrIChMaW51eCBhY2NvdW50KSA8bGludXhAcm9lY2stdXMubmV0PsLBgQQTAQIAKwIbAwYL CQgHAwIGFQgCCQoLBBYCAwECHgECF4ACGQEFAlVcphcFCRmg06EACgkQyx8mb86fmYFg0RAA nzXJzuPkLJaOmSIzPAqqnutACchT/meCOgMEpS5oLf6xn5ySZkl23OxuhpMZTVX+49c9pvBx hpvl5bCWFu5qC1jC2eWRYU+aZZE4sxMaAGeWenQJsiG9lP8wkfCJP3ockNu0ZXXA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MW1dlI3HfeB2gj7Yc8XdHh9vkpPyuT nY/ZsFbnvBtiw7GchKKri2gDhRb2QNNDyBnQn5mRFw7CyuFclAksOdV/sdpQnYlYcRQWOUGY HhQ5eqTRZjm9z+qQe/T0HQpmiPTqQcIaG/edgKVTUjITfA7AJMKLQHgp04Vylb+G6jocnQQX JqvvP09whbqrABEBAAHCwWUEGAECAA8CGwwFAlVcpi8FCRmg08MACgkQyx8mb86fmYHNRQ/+ J0OZsBYP4leJvQF8lx9zif+v4ZY/6C9tTcUv/KNAE5leyrD4IKbnV4PnbrVhjq861it/zRQW cFpWQszZyWRwNPWUUz7ejmm9lAwPbr8xWT4qMSA43VKQ7ZCeTQJ4TC8kjqtcbw41SjkjrcTG wF52zFO4bOWyovVAPncvV9eGA/vtnd3xEZXQiSt91kBSqK28yjxAqK/c3G6i7IX2rg6pzgqh hiH3/1qM2M/LSuqAv0Rwrt/k+pZXE+B4Ud42hwmMr0TfhNxG+X7YKvjKC+SjPjqp0CaztQ0H nsDLSLElVROxCd9m8CAUuHplgmR3seYCOrT4jriMFBtKNPtj2EE4DNV4s7k0Zy+6iRQ8G8ng QjsSqYJx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/23/24 05:58, Geert Uytterhoeven wrote: > Hi Günter, > > On Mon, Sep 23, 2024 at 12:50 AM Guenter Roeck wrote: >> Building allmodconfig images on systems with SPARSEMEM=n results in >> the following message. >> >> WARNING: unmet direct dependencies detected for GET_FREE_REGION >> Depends on [n]: SPARSEMEM [=n] >> Selected by [m]: >> - RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m] >> >> and the build ultimately fails. > > Really? What's the build error? I saw it on hexagon, and I didn't bother writing down the actual build error message. But it turns out you are correct, the m68k machine does build with CONFIG_RESOURCE_KUNIT_TEST=y even though SPARSEMEM and with it GET_FREE_REGION are not set. Never mind, I don't really want or have time to argue. I'll just disable CONFIG_RESOURCE_KUNIT_TEST when building hexagon images and wherever else I see the problem. > It does build for me on m68k, after fixing: > > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -101,7 +101,7 @@ extern int mmap_rnd_compat_bits __read_mostly; > # ifdef MAX_PHYSMEM_BITS > # define PHYSMEM_END ((1ULL << MAX_PHYSMEM_BITS) - 1) > # else > -# define PHYSMEM_END (-1ULL) > +# define PHYSMEM_END ((phys_addr_t)-1) > # endif > #endif > >> GET_FREE_REGION depends on SPARSEMEM, so any configuration selecting it >> also depends on SPARSEMEM. Add the missing dependency. >> >> Effectively that means that RESOURCE_KUNIT_TEST is now restricted to >> systems with SPARSEMEM=y, but that can not be helped. > > Perhaps the individual test(s) that do depend on GET_FREE_REGION should > be protected by #ifdef CONFIG_GET_FREE_REGION instead? However, > I have no idea which parts depend on that, as apparently all tests > succeed on m68k/ARAnyM, with CONFIG_SPARSEMEM=n: > > KTAP version 1 > 1..1 > KTAP version 1 > # Subtest: resource > # module: resource_kunit > 1..3 > ok 1 resource_test_union > ok 2 resource_test_intersection > ok 3 resource_test_region_intersects > # resource: pass:3 fail:0 skip:0 total:3 > # Totals: pass:3 fail:0 skip:0 total:3 > ok 1 resource > Interesting that you get that to boot. The q800 machine crashes for me when trying to boot it in qemu with the latest upstream kernel, in function __pte_offset_map_lock(). It bisects to commit 394290cba966 ("mm: turn USE_SPLIT_PTE_PTLOCKS / USE_SPLIT_PTE_PTLOCKS into Kconfig options"). Reverting that patch fixes the crash for me. I guess you are not seeing that ? Thanks, Guenter