From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id 14FDE3858C60 for ; Thu, 25 Jan 2024 10:17:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 14FDE3858C60 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 14FDE3858C60 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706177838; cv=none; b=ucb4y4mY6PnsHxaqxjRWWNjppvcehXpGmekxYm2IdFNIMobw90EuSqJfNfxNRYcCL74XoqSLnQFIELd5/t0C03VRfvpuvPbxVHSivGId0sKDftrVU8JTwR0jOErnsUHwo0p4wkwtymy8QAmMoP335sBcxxJ4HMo90CYtGuV8/yE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706177838; c=relaxed/simple; bh=UDFzVn4tZtWoBx4kaAzBSGmwUjQpM+AFgFNQ/QbbmSQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=CwoQvHKXdpEGh/MGQQ33sMjfmXh2kFs+uKBUs74WhMcoq3pTrGSrtsw7BNGectqFf3Gh02LUZ6ikw8WnhzA41/LrowGU1ix4QT/ekKhfOMFQx8WL3Clpd3ZSYsaht9oKWNBJKCMvs7hDt7lKcYTWE3hBMzAZtuU8hvclbqzaJrE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40eac352733so47119355e9.0 for ; Thu, 25 Jan 2024 02:17:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1706177834; x=1706782634; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Vz079eNeUukYv88tz0AaWDZ0Pr1TK+7XN/beeHb5dTM=; b=1mUxJreW4oajlYU18mMkCA05c6gLvZMSSJyOiU5ZrW8V6usxl4CxhByfY3LCs3vV8M iXJKyD+bHVEUY8iSYz0i1WDl4wZvvYfxohtNfkPi35ner9KWqlqFJWkoMTe50XOeoAkH jc3ih0O6uqeeF9imMAQzuk3E3N32OwbRW0nS6UFUYqNN/fhChzZkocGbxzv9aXHC3YyY gAD0Afv81dTET4G69grU3XDtS0qnPgr/qIo63BsoXItk9ydpDwABhV9A3nM9NApX6b9S ZHnHPrCd5RZDrl3oFN1Eh9deGbUE9yK+6AB7Q/HXsk02AKuxrVKiOP2+442SwDiLZQl8 vNsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706177834; x=1706782634; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Vz079eNeUukYv88tz0AaWDZ0Pr1TK+7XN/beeHb5dTM=; b=FxSuOjRT9FYfmB59VtBS5VfKiuSjfNk9rmnUN3ZrV8Ggn91XsSrAqWgYRb4akyiD28 fgVdKzeyWwPOCfW5pVZhNZcm6gbzTBBOKRP0qjykg8jSukNX476l9XL6pafk52HBJJ1H BESD0KX1Keo3nZjeHDk5gYeT6tl/QvgCpuALy1oDhOCSdzUUZRqFWMc4CAbMkoCriYzT 4jGIg5lQcCiLIYXocnEH0AcvH2SqiLeez3oK94tHzOXuljdT6AVO6Daj6xH9AK/ruOqY N9MOFgQOgvP43w1isGKK/8a6Q3YDoGR/tc9FLeczK6CKwhxyy5FLyyam7vZPCC/FcjZw BBqg== X-Gm-Message-State: AOJu0YwAAD7xr1S4P/LrtIs/FaG39hDVIawqxL5ofy5phUxyEXQrU73U rsooXEAk3ShQvfjZ8SR4KgNh9Jf/G0Z9NCZa8agpd5lLfB4joR5+MK/Jh3FjGNM= X-Google-Smtp-Source: AGHT+IEP3eNcMKj2j8jJ+Orc0ZS+rW3nl5HnKunoHzmkaY0vm6OY136IL+TlIX/hkcReOUJNavNZVg== X-Received: by 2002:a05:600c:314a:b0:40e:482d:bb68 with SMTP id h10-20020a05600c314a00b0040e482dbb68mr356769wmo.111.1706177833752; Thu, 25 Jan 2024 02:17:13 -0800 (PST) Received: from [192.168.0.118] (hawk-18-b2-v4wan-167765-cust1304.vm26.cable.virginm.net. [82.41.69.25]) by smtp.gmail.com with ESMTPSA id n14-20020a05600c3b8e00b0040d8d11bf63sm2013329wms.41.2024.01.25.02.17.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jan 2024 02:17:13 -0800 (PST) Message-ID: <8f1c4d70-d067-45ff-9a4f-076f47c470da@baylibre.com> Date: Thu, 25 Jan 2024 10:17:13 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [patch] gcn/mkoffload.cc: Fix SRAM_ECC and XNACK handling [PR111966] Content-Language: en-US To: Tobias Burnus , gcc-patches References: <45e2515e-b9aa-42a4-908d-80b2189c7aeb@baylibre.com> From: Andrew Stubbs In-Reply-To: <45e2515e-b9aa-42a4-908d-80b2189c7aeb@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 24/01/2024 22:12, Tobias Burnus wrote: > This patch fixes "-g" debug compilation for gfx1100 and gfx1030, > which fail to link when "-g" is specified. The reason is: > > When using gfx1100 and compiling with '-g' I was running into an error > because the eflags used for the debugger file has additional eflags > (elf flags) set - contrary to the compiled files; mkoffload writes files > itself, hence, it also needs to get the elf flags right. > > It turned out that the ASM_SPEC handling was insufficiently replicated > in mkoffload, leading to issues with gfx1100 and gfx1030. I think in > some corner case, gfx906 also behaved differently; for gfx900 and fiji, > the eflags were different before, but got reset inside > copy_early_debug_info such that those difference did not matter. > > OK for mainline? I've got so confused trying to figure out this stuff and how it works with different LLVM, different defaults, different devices. I think this patch is fine, but we should wait until we can test it on all those devices. Andrew > Tobias > > PS: I tried hard to look at the ASM_SPEC and played with different > options, looking at what really got passed to the assembler, but I > might have missed something as the code is somewhat confusing. Naming > wise, there is both UNSUPPORTED and UNSET for the same thing; it should > be a tad more consistent (flag = UNSUPPORTED, SET/TEST functions: UNSET), > still, one could also argue that a single name would do. Sometimes not passing the -mattr flag gives "any", and sometimes "unsupported", and sometimes leaves the flag unset. I think it's changed over time as well, but mkoffload has to match precisely or it won't link. :( > PPS: I think the PR is about other things in addition, but it also > kind of covers this "-g" issue and the one of previous commit. Even > if not directly addressing the issue, it is related and having the > commits listed there makes IMHO sense.