Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp351779pxb; Fri, 3 Sep 2021 03:41:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIKDDnJOSI7ncjJLRU1xVXQ4xYQ40JkXiYxOYnWE+C3AMxnXGzsD4p9yA3Zz6CNmjxFGZr X-Received: by 2002:a5d:87d2:: with SMTP id q18mr2575809ios.78.1630665684765; Fri, 03 Sep 2021 03:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630665684; cv=none; d=google.com; s=arc-20160816; b=GRxBVpvP2JfTmk4+5hFY/0cFQMqvJKQiIOJrpaSM+7dZC4tiWf5PKDrXdREts4bBwN XBGwz/DCdweQcLHHJsCwskNAd2al4xv+D0ndzLxcjUl9lRVb4XOJbLvc9qLbLrOdE1nY hwZQLMOvoUEoVWt2HCOBe0jgo16NaNlXu4CUdWmb3Fk4h0B4s4VpyY+pMvivH61/Zw0T T3mmi1uFCtFqbjm/WQ3Ut/bw2EUPHhVCwqaKozXafRFSslysBTMzlD+gTZILcDiorZp1 KwcmXT03gPbIFng1/jUqcRMVpr1o42KIxFpKJ6LuIcRQ1YZKei+Pgmg8nvhg1DluLwFH Qdbw== 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 :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=0XIo+rRgBSORUxX81fs/5+7YxPsJ1lRs3Yt+fDK7L9k=; b=y1m3iuvRWL25dWkSx9Ah9zqY+z+WgJPmZi+PrbxBP4tf8knVUYTx29Cg1tG/rJWkyU J4zWQMh7CdLwTeAXSVao7lfFnNJl+gOjKKP6DRHtq0MifX/J59u1c+w0C6tmP2JH8TJJ FnxCkBTnskgTSlvUi8jY0OP5AXvZaNm2fKxQum6JXmPHKB5VmmGGDAISw4NPFbF2ePyH Nhe44ZB+Yqxv26Ud2R9yN8ZFi87pdb94q6sgCqgiaNd06hYUx56q5/RydM5MgF8rqdf1 AGBSAKbsd/GIyDmNhr36dg98KzYvih3WivrGbdjOjjaR0rO2A6oOMnEc2eB5UrknLLCk SmWw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si5730900ilg.105.2021.09.03.03.41.13; Fri, 03 Sep 2021 03:41:24 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348205AbhICI2e convert rfc822-to-8bit (ORCPT + 99 others); Fri, 3 Sep 2021 04:28:34 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:28368 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348197AbhICI2c (ORCPT ); Fri, 3 Sep 2021 04:28:32 -0400 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-79-3d9V2QZ9O8Co0U925nMRmA-1; Fri, 03 Sep 2021 09:27:26 +0100 X-MC-Unique: 3d9V2QZ9O8Co0U925nMRmA-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 3 Sep 2021 09:27:24 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.023; Fri, 3 Sep 2021 09:27:24 +0100 From: David Laight To: 'Johannes Berg' , "linux-um@lists.infradead.org" CC: "x86@kernel.org" , "linux-kernel@vger.kernel.org" , Johannes Berg Subject: RE: [PATCH] um: don't use CONFIG_X86_{32,64} symbols on x86 Thread-Topic: [PATCH] um: don't use CONFIG_X86_{32,64} symbols on x86 Thread-Index: AQHXn9SPoN4pW3t210qkf8kng5akKquR+fUg Date: Fri, 3 Sep 2021 08:27:24 +0000 Message-ID: References: <20210902102750.1ddfef4c1915.Icb5c49998c55b87c8584d46894c01b114ae2e661@changeid> In-Reply-To: <20210902102750.1ddfef4c1915.Icb5c49998c55b87c8584d46894c01b114ae2e661@changeid> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg > Sent: 02 September 2021 09:28 > > The CONFIG_X86_32 and CONFIG_X86_64 symbols are used by > both "real" x86 architecture builds and ARCH=um today. > However, clearly most people and places in the code are > treating it as the architecture Kconfig (technically > that's just CONFIG_X86) and use it to indicate that the > architecture is X86 in 32- or 64-bit flavour. > > This has caused a fair amount of issues in the past, > for example drivers not building because use x86 macros > or similar under CONFIG_X86_{32,64} ifdef, and then we > find build reports and add "!UML" to their Kconfig etc. > > However, this is error-prone and a kind of whack-a-mole > game, even with the build bots reporting things. I suspect you've just changed the 'mole'. You've now got lots of lines like: #if defined(CONFIG_X86_64) || defined(CONFIG_X86_64_UML) Missing off the UML define is going to cause the 32bit code to get compiled by mistake - which is likely to be more confusing that the places where you need to do special 'stuff' for UML. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)