Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1256645rwr; Wed, 26 Apr 2023 12:12:45 -0700 (PDT) X-Google-Smtp-Source: AKy350au2Oo9KefSIaXWSbvKVStGrQPhNQg32cS8YHbKElD4amjjpeMR73LKt7LZO0bKgygdOdjV X-Received: by 2002:a17:902:fb0b:b0:1a6:9363:1632 with SMTP id le11-20020a170902fb0b00b001a693631632mr18559419plb.25.1682536365689; Wed, 26 Apr 2023 12:12:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682536365; cv=pass; d=google.com; s=arc-20160816; b=cLJXekvDzMl8segLBdbWPsypUhfu9QLfgtfs3VA57O6vqDCjsuMnaLJWwF/0+LiGWi xqVVNjXI+1dtLoHcm6dLgasqtTaMiaFnUJCq3UKUZgvbDRqT7c3qX3fuUjbVj65vNAYY /fS1Co6EV6e2ZbyK4k4E6X3HX03sRqb0TDWBuPGfIxDn19g9ENlznxF41STih2TGdhdG gi9p8np9ZkBFDdrRm4lS33wawpTwZukELGKxDuVYuqe4fMqDYV2zzh76FAGyMjrc5hPI 4XnW3HALK6lw1X1WRAWCCy2oX4+RFDNqzLW5Kr+UvCdMv9NfkU5DCJ4Y5ziDwSi03AA6 vDxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=2QG6LAhYEEWaLhdrBSwbf+B9rIqmisV7caBrC3i2RlI=; b=bUPiYDE6cFaFwGgCXfcIenjWtoZP8g5g2b1IB7JO5UzmouLgDZo/1SuE4ILEsypO2e AyPj1Rxy6VbxkCn+UZhNqztSjuwFQdxu/gsDaGfISMf61Wd27JycyaTXgwQsl0JMGST0 2exD6rME1py40Sb525/0ylyPPD3CnnJRyXlnp1x2bRKrq52o3hIt4et3iGy+Aukl5WmT Dpd2A/hBTneIp9UuW6sfI++WH0kJplm8goQMgdZ06z37mROx/IcU8DwBNQHfunVkHtDu zejzEeyzHyoBi8jCM/eKjwOpJt2L5m+QK98TAt7CQqKQDmDOt9KylPfUmEgm9QvQZip4 otiQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=nMyMMK9o; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e1-20020a17090301c100b0019b521f4b07si18555724plh.52.2023.04.26.12.12.33; Wed, 26 Apr 2023 12:12:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=nMyMMK9o; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235015AbjDZTDU (ORCPT + 99 others); Wed, 26 Apr 2023 15:03:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233991AbjDZTDS (ORCPT ); Wed, 26 Apr 2023 15:03:18 -0400 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2071.outbound.protection.outlook.com [40.107.100.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 573EB83C3 for ; Wed, 26 Apr 2023 12:03:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TfztEn3VbszzN+T/fwWqo/f+lNd/v6x/L8Xjk/QiVaXDqahq1DYRA1zUS7Y4TRhPI+z/Hr6WbcoRi9qnsJqeq/Z+nMoLtXM09TwjmIRAmST+WYHCK0XHRL83BbNoXOL6EhaG0XJMy/wQXpstFx4j1C/PW/sm6RF4llbdwzvtmhxCvitlRdfuiEleEhgHLETqPnU66YvFndqoFZlbKjL+ajcNE3YqGme0vp8FTU3Kq6vnEknKeT+lYBuyMgWHyXMqJPRYtlsykS028iykdv1DuaupC4nfLEOKEn4GhREo2G2q0O2zZLjOZJai9AC8KL4fSvVsUCd4PotPmk1nCQlq1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2QG6LAhYEEWaLhdrBSwbf+B9rIqmisV7caBrC3i2RlI=; b=MVKQ1OVgJtMly6AGdG92ObfeA0NZ5O7f0W6t2WITfRQv+kig8yJqcUni4izq44dJPLAuwANn3tL3I/nmDri+ifPCGCFY7yAllMkdJdVQB5CuB3S7EQS4XMGT7/ZCVc+6wSsjVpYLFmX/tPZ3+ZCxjuyTp2vckF4oGM6xypGJrd81ghf5UJty9RcWf4k9xC1fLUlKowXidXgYUq1WG3q/wETdBN0jMGrCnjJ9IYQ+bQw5LWk8dYP1vHOXlhrYPG6lqvWIWfJOKRSwfGmoc3xsnrnndifxof7rXVmV4IdVIlsExVJzlx1OUha14sL3tFNcBHBVbKnyO3p8loQp7ywySA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2QG6LAhYEEWaLhdrBSwbf+B9rIqmisV7caBrC3i2RlI=; b=nMyMMK9oborVwVpsjrAD79Q3T0T/Arx9vKp9Ze7TsKW6wjW5o20T6uK9DyO+EReD5rvzbA+G7SlOoduPMaPKu/jc2iIV8c5/1b+V9OOdVWtavdn+DkWSvXklSOWKSawhPtIn0fJAgE+V75oicbCZOWEvtk4kT4i7JE3+EPr2IVc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) by SA1PR12MB7443.namprd12.prod.outlook.com (2603:10b6:806:2b7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.21; Wed, 26 Apr 2023 19:03:04 +0000 Received: from BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::d2f8:7388:39c1:bbed]) by BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::d2f8:7388:39c1:bbed%3]) with mapi id 15.20.6319.034; Wed, 26 Apr 2023 19:03:04 +0000 Message-ID: <066e88f0-366f-f9fc-e0a8-ba60d7777e28@amd.com> Date: Wed, 26 Apr 2023 21:02:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: mainline build failure due to 322458c2bb1a ("drm/ttm: Reduce the number of used allocation orders for TTM pages") Content-Language: en-US To: Linus Torvalds , "Sudip Mukherjee (Codethink)" , Michael Ellerman Cc: =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , Huang Rui , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: From: =?UTF-8?Q?Christian_K=c3=b6nig?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR2P281CA0015.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a::25) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8PR12MB3587:EE_|SA1PR12MB7443:EE_ X-MS-Office365-Filtering-Correlation-Id: 95ebec0f-f939-47f2-95f0-08db4688dd3c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qDz0oMocJu9RfnewJJMCBCMYNQcwahZroYaHNylN0ggQY5QJOhwZYKapAov+i5EGWoohtMNqfhms/zeDsgwXWtqXlnm/fh555SYYr30njBrwajsLW5TdvQ4MNgzNsVCejjm7OHi2wfDixC0cXMx6UHdvBLTVEmuklfv3yjJOvETzNY3YSpaIoA/SwdTb9jTcnHgC9kXCVxQYOQSwxKVcf/jEw//cYsX9OeOA992GiA/4UFL6E4NOpBstwQ1V7otsaHMD9sy+QUXfPv0bPI1ijI0WhmF8mJDgkYSi2CtnkasFXqFWA/ACiIOtRa+oBllfKqcZh0zefBm+KmDlOI7134EMkQ5SuKV5VqwLkoDs9+Dm+g0vxmeuRZSb3Uu89iXgYDMNRJT9kDvMAYHoKvm7DFL9z+xXloQZ+INzPlMSnNMS/ZMwNYhmtMBZbUq/umEfG3lLbZCW+d8WTncMyEQctwLmPd7pYN+AWX/n/ZwMV9nZcAqifv8cXPaEaJRxTBzgeEl5Qo1a9R5ajhmxYHncvwBSOS+MEUaeMKRsrFFFvt55QVEGduBIifMh+x9Tjgor+vdLc2Q8DQNnFC+dDU6ouNaN1Q6aoPjW6NNeCx5EaUdBzS3g9/xaTTwZHxfxaz7VFZhLU3CnP8o/Av94oNkOlQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3587.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(39860400002)(136003)(396003)(366004)(451199021)(38100700002)(8676002)(8936002)(5660300002)(478600001)(31686004)(53546011)(6512007)(6506007)(2616005)(66946007)(83380400001)(66476007)(66556008)(4326008)(316002)(6486002)(41300700001)(2906002)(6666004)(110136005)(54906003)(86362001)(31696002)(186003)(36756003)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RWg0d0hRelkyM0IvWmYzbFppWXZqY1BKT2QxVFpWN0FyMWswQUx0WnNHejJ2?= =?utf-8?B?b09STCtxUFN2Mll0OXN6UFFleDRoZEJvTUpCRXQ5WWNsaS9UdEpqOHVZY1JU?= =?utf-8?B?eG02UTNhdXBvZTJPdXFqcTVkOVgvN3BHK2hJd2gxTEdkU0VDdTdEdTJuMk16?= =?utf-8?B?TjlYMHdpZHFIOEwvVTlBS24xS0Z0Skd6OTViMFhGS0tJcGhja0hsL0RpeG9Z?= =?utf-8?B?bnVBTzBnVXRsUEl3TEFqdUVhQ1ZPTURDSzFtOExaZ3Vhbit4Z0V3TTRSRi9i?= =?utf-8?B?Lyt2ZGdOaEFiOE5aMlJZMi9DZC9BT3p2OXJ0dStpYWlGckJJQjVGc0ZRUTNM?= =?utf-8?B?dEFCeEJVTjlyVmQ4TGREaWdwVVpSd1VLcXNtN1pmTC96cEt3NEJIbFVyNXBB?= =?utf-8?B?TkY5R0FjV0xzT0FEeEhIVkRHaG53Vk12UU01MFkzYU95aWVzb1pSTjJuUkE1?= =?utf-8?B?OWxTWW9uaUYxelhLM3V2Y2hoNi9UT0J3eFBSOHpjbURoMTNuZGdBbnRueEl0?= =?utf-8?B?ZH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hSWpXcyth?= =?utf-8?B?MXBiczd1VG1NMUhSQm10YVZZQXAwK3JpbU8ySDF3ZitwdWFoMEZFaWhyU2Ur?= =?utf-8?B?Qzk1RkFWN1NRa1JtRFJrTHd0WFBUcHh6QWFxaDVSUTBSc05WSmlSS0JMMG9q?= =?utf-8?B?RXg5b3pYN2VHSFNacmtXRmJhTG9YbS9FMmt3Rlg4Rkp6WHRJdWpqcHh4Zkda?= =?utf-8?B?cWdrUUREY1ppbXJCc1NFZ245Z01NdXhQdW9JeEJVSDNHU2Y1RXJDajVUekdW?= =?utf-8?B?YTJ6TFR0dS82TmFMVFZJR1B1RWtDYmhuYVRsa3NIbDErUzFYWDk4d2lDSzZh?= =?utf-8?B?MEQvWmpOaTI2ZEhwaXhxdkZEMW1iSHdnb1ROdHRzTWg2Y1c3MnRSU00xSE9a?= =?utf-8?B?MGl0V1J5Wmk0eFNseUs1OE92bU12UDh4Ym5KRUlFajM5MEVWb3ludlpYYUNm?= =?utf-8?B?Q04zZXNUOWlRZlp0RkRvRCtwb0FqTDF2dlRMYXlVQ3l5cnppbSsxWE5RWVFC?= =?utf-8?B?VHozeldJNTBablh1OXhpdEp4b3BKaG85NFBsTzF5dzYyVGpGdmhZRGpKM1Jt?= =?utf-8?B?K211Rk9uTm00eENsREJPaWp6QWlJYVVEVHJLYlUwQWhmZG45Ly9LUDNZcWVX?= =?utf-8?B?YXVZRjE1eHN6MC9vREsvcFExUWNtUjhMMkg4cHQ1U3dNemZPa1R2L2dIbHFh?= =?utf-8?B?Q1I5UXJhVVByYTN6VHlLcHdNUklicVZCcFU3a3VWeUdtKy8rNVI3S0RHajN3?= =?utf-8?Q?f+j+zBk3a9dX9WTx3iDMYiAbZTBVIKyf4KL2GL+5KxTn?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95ebec0f-f939-47f2-95f0-08db4688dd3c X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2023 19:03:04.6093 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /H//4K/ITYMSa6+pc9PK1QI1MK5X8Ec4sZa5uYSRGEE0MPSmy0dWxkAlD9IhhOG9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7443 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 26.04.23 um 20:30 schrieb Linus Torvalds: > On Wed, Apr 26, 2023 at 10:44 AM Sudip Mukherjee (Codethink) > wrote: >> drivers/gpu/drm/ttm/ttm_pool.c:73:29: error: variably modified 'global_write_combined' at file scope >> 73 | static struct ttm_pool_type global_write_combined[TTM_DIM_ORDER]; >> | ^~~~~~~~~~~~~~~~~~~~~ > Ugh. Revert of this is patch already on the way to you. > > This is because we have > > #define TTM_DIM_ORDER (__TTM_DIM_ORDER <= MAX_ORDER ? > __TTM_DIM_ORDER : MAX_ORDER) > > which looks perfectly fine as a constant ("pick the smaller of > MAX_ORDER and __TTM_DIM_ORDER"). > > But: > > #define __TTM_DIM_ORDER (TTM_MAX_ORDER + 1) > #define TTM_MAX_ORDER (PMD_SHIFT - PAGE_SHIFT) > > which still _looks_ fine, but on 64-bit powerpc, we then have > > #define PTE_INDEX_SIZE __pte_index_size > > so that __TTM_DIM_ORDER constant isn't actually a constant at all. > > I would suggest that the DRM code just make those fixed-size arrays > use "MAX_ORDER", because even though it might be a bit bigger than > necessary, that's still not a very big constant (ie typically it's > "11", but it could be up to 64). > > It's a bit sad how that macro that _looks_ like a constant (and is one > pretty much everywhere else) isn't actually constant on powerpc, but > looking around it looks fairly unavoidable. > > Maybe the DRM code could try to avoid using things like PMD_SHIFT entirely? Yeah we already try very hard to do so. I quite often have to remind people that the CPU architecture doesn't affect how many bits the internal address space of a GPU has and they should always assume u64 for those instead of unsigned long. But I have to agree that it's a bit unexpected that a constant everywhere else is not constant on this particular architecture. Christian. > > Linus