Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4260319pxu; Wed, 9 Dec 2020 12:20:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSpLG/8RztxAJ8HVUE8LZBroTM7qcW1ioBqRN3fjc5da2NZemqT9utiicJ4/rDl1amSqDm X-Received: by 2002:a17:906:a00a:: with SMTP id p10mr3594126ejy.312.1607545210799; Wed, 09 Dec 2020 12:20:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607545210; cv=none; d=google.com; s=arc-20160816; b=MWEHssHD+0VVLAFhvnMF9yzcow5KGMGjH3ESi3vP21WqCluNnSRb2/78GC7BfF2gKo pflAnx5ARpq06HpeMbgEWntRug4+kyK2Xr0dYGizyR/axpNmQkNHETaA9GOlINSMpdY1 X66dO+dpeRsNU2F/RulDR1CRcTT9+K165vTEDmZWmzarwxqun2JeuEetr4MDQTVbqQQ5 qq6sJZt6AR0xjSS/aGNBJ3lNM7tFrlxoKL01GX90KVGVje7GPAT539a4rfnpOuIW3r/r PpCPZ3Dr/khTiMLNVZwfS4UgVSAqhsDwglnFuRW4bqR6lytoW36fRcx5ZR0XUIjSV4rh 9Mzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6Dok2Dg8TGlacaeSAxWT9P1pi2O1C9NTVB+p8kbM4WI=; b=cbMLKJ5xy8cTV3JVs0MylFGH3pBUmJ1F0LsxRiXIVuQmP4UoBWUqvnOm6aOzusCeuF rF2FCaZ/es4wCY1JhnnFwZhdVlmkDxwcuRaXo57cQbWt88HiLS4n2L4mcD1+iXv3ZlXx rAUONePeFS59vyDmTCu4hzSWnr3AJE3lJ0F9TmLFe7vKupPSeJ+MC6y9rjpA7s1dJvMW xAqiXgqqSvt7vTll9dRB8ATqw2LcjpFqUvgfSZBYQOLHqp4p4S7mtf46MOKseZlA7NA8 nin9umfKak23teBjrh0YpEA6oJhYpV5jDX3IHofHrj/HLVV1s+C1Bxj3b0yR/OispvOb 2tbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=h6HPKi5y; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si1603102edq.548.2020.12.09.12.19.46; Wed, 09 Dec 2020 12:20:10 -0800 (PST) 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=@linux-foundation.org header.s=google header.b=h6HPKi5y; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728107AbgLISIz (ORCPT + 99 others); Wed, 9 Dec 2020 13:08:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727331AbgLISIz (ORCPT ); Wed, 9 Dec 2020 13:08:55 -0500 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CD22C0613CF for ; Wed, 9 Dec 2020 10:08:14 -0800 (PST) Received: by mail-lj1-x244.google.com with SMTP id t22so3525151ljk.0 for ; Wed, 09 Dec 2020 10:08:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6Dok2Dg8TGlacaeSAxWT9P1pi2O1C9NTVB+p8kbM4WI=; b=h6HPKi5yzqhzOtvnkkrpaq9r4NQBJGYRD3Dwf2W7//GBglY+j4zf2PZjYJhr38VC7y h7VHdi5SsiKOD+OU+gixOwIY4mlkuQ0a2NsRY9JVT/FFj72jK/YaD6KIn06Jkdi/bY4e MlT+DNjqom65eVl5fnmry0QaMVhtjn21KrCtU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6Dok2Dg8TGlacaeSAxWT9P1pi2O1C9NTVB+p8kbM4WI=; b=VtmtuGcm8fgTGuxqXWQl0zdRq4r8t6UmcBDHOQcWxqqm7GvsrEooTE3YqPCZsEcJD7 KW9pG8p5IbI8SrL2NvUrCK0yZIyvVClNnN/5vXZsW0homYuJvpDd8YH/rx3wCjHn9RoH sxtTg7/KHglkByMEO5LLxSabk+QXOKmvU/2Foqyi/6HMRPNHpP6Ill//7gOULMAC9ybX +r7XKSrV7O9S4PAVJeBEdst5jzQui+WX0hFDaDUcM53Yuwh78dEhhWIyKP+jidk6p8SE x9cIhQbck19lSBYwG4V79Aoo05pPbrzsbvQrMLbk/bPOAd80T2oxx43NSbF4ALjmTBTc /glg== X-Gm-Message-State: AOAM531QykN9XkLKxHJXjnIDikAEn45gtlKLe9Z3qQYG/9jQxnQMAyDT vLwxcvAsezZzEMYQKBEe/dWIF8nnBo3pWA== X-Received: by 2002:a05:651c:39e:: with SMTP id e30mr1559005ljp.497.1607537285516; Wed, 09 Dec 2020 10:08:05 -0800 (PST) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id m16sm245712lfa.57.2020.12.09.10.08.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Dec 2020 10:08:04 -0800 (PST) Received: by mail-lf1-f47.google.com with SMTP id u18so4347325lfd.9 for ; Wed, 09 Dec 2020 10:08:03 -0800 (PST) X-Received: by 2002:ac2:4831:: with SMTP id 17mr1291940lft.487.1607537283578; Wed, 09 Dec 2020 10:08:03 -0800 (PST) MIME-Version: 1.0 References: <20201209141237.GA8092@willie-the-truck> In-Reply-To: <20201209141237.GA8092@willie-the-truck> From: Linus Torvalds Date: Wed, 9 Dec 2020 10:07:46 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] IOMMU fix for 5.10 (-final) To: Will Deacon , Suravee Suthikulpanit Cc: iommu , Linux Kernel Mailing List , Joerg Roedel , Alex Williamson , Robin Murphy , Lu Baolu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 9, 2020 at 6:12 AM Will Deacon wrote: > > Please pull this one-liner AMD IOMMU fix for 5.10. It's actually a fix > for a fix, where the size of the interrupt remapping table was increased > but a related constant for the size of the interrupt table was forgotten. Pulled. However, why didn't this then add some sanity checking for the two different #defines to be in sync? IOW, something like #define AMD_IOMMU_IRQ_TABLE_SHIFT 9 #define MAX_IRQS_PER_TABLE (1 << AMD_IOMMU_IRQ_TABLE_SHIFT) #define DTE_IRQ_TABLE_LEN ((u64)AMD_IOMMU_IRQ_TABLE_SHIFT << 1) or whatever. Hmm? That way this won't happen again, but perhaps equally importantly the linkage will be more clear, and there won't be those random constants. Naming above is probably garbage - I assume there's some actual architectural name for that irq table length field in the DTE? Linus