Message ID | 20230712180141.713006-4-tim.gardner@canonical.com |
---|---|
State | New |
Headers | show
Return-Path: <kernel-team-bounces@lists.ubuntu.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=A5oWgofc; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R1QYR1B4Lz20cd for <incoming@patchwork.ozlabs.org>; Thu, 13 Jul 2023 04:02:02 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from <kernel-team-bounces@lists.ubuntu.com>) id 1qJe9y-0001gF-Jp; Wed, 12 Jul 2023 18:01:54 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <tim.gardner@canonical.com>) id 1qJe9v-0001ff-Hr for kernel-team@lists.ubuntu.com; Wed, 12 Jul 2023 18:01:51 +0000 Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 4A1EA3F438 for <kernel-team@lists.ubuntu.com>; Wed, 12 Jul 2023 18:01:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1689184911; bh=0QqBv/JQGa1IMEGoRXA2Q6Mj+HIcWpasgGRz1IJf36Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=A5oWgofcqMNihU1ItddUUmeQt2Xul/H6FwFTckWiKXqxU26GAlOvATrDbhyqTjaF/ HDg5eReGb9r+SsynF4fXJTnbxgyPS9VKy7DboRv+r5DDKYIWJu8EOK7r9GvqjHk9ko FbV74snrDS8h8bZi7Kk8mGLlIBrS+UlPom2Cqa7CoZ3ABoRMMV/fLjF+gxZVaRrs3L vNg41mxyw5obj06Z1yrTlSXnezrNGPwvfwAXeMV9ncExT/xWguIlUNGxX09LYXtkGb 7xDKNIS/KS6o5WcIxTIOabxtVkfswIAftjyU7L1yEX6JXkP3kTLSkEum42xGuOuEgu ZXR0QsJTGFOdw== Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1b8959fb3c7so70263345ad.0 for <kernel-team@lists.ubuntu.com>; Wed, 12 Jul 2023 11:01:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689184909; x=1691776909; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0QqBv/JQGa1IMEGoRXA2Q6Mj+HIcWpasgGRz1IJf36Y=; b=G7UmweKd7Xnfnt0jqKqBwc4xp9HYeQkc/+n/vCsMftYQ4Q9fJnRen/7tJs9xa/rIKA gFxO647+r14942+DEmr6/ktBD2oa8OZuyiTH+VbxUVfwR03FMLbb1wNEKMPM7RZfhBWn ztfgrF65ey99TZSVNUQ0YOdltIKoQF26afHYAh1+JK60ChvpxnuJ94oOyo9MJ0OcLhPu eP78qrGg1J5Gp3KyU2Q9wnzRIZc9RbpQVtm1R2PRgCb8vwGsj3JpdtuAugyCGIJrsbT2 bS8+Z/+1coNpx+O8eBYmMkzp1nVgbNP/DWT8jbGMC/AciUAnt+JjCSuCCoJ94VtDp7nj Tgyg== X-Gm-Message-State: ABy/qLZTWiSQKPClDbqLboNE1rZAEcX3qShjr4BFnuekjX7nd2g2DEHh 7XlCCDbPudXQDElqYErYvHmtT7hTpXLT9clEn3nbQAixgkbz/8G0HT0pbNzSBGZG/tPBdQ21lxl 2Ki4BXAygpSqUV8if0hJTysND1jbbuGJvuMBF5zm+Pysm4yg8zA== X-Received: by 2002:a17:902:ee91:b0:1ac:a28e:4b29 with SMTP id a17-20020a170902ee9100b001aca28e4b29mr4652241pld.26.1689184909710; Wed, 12 Jul 2023 11:01:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlGd/+ipdHfmMV28u3v5uXMU0HdF4V3PlOaGLxqh02B/5zqPhbKwnbTUEZH2MW5OHzAsm6zsGQ== X-Received: by 2002:a17:902:ee91:b0:1ac:a28e:4b29 with SMTP id a17-20020a170902ee9100b001aca28e4b29mr4652226pld.26.1689184909397; Wed, 12 Jul 2023 11:01:49 -0700 (PDT) Received: from smtp.gmail.com (174-045-099-030.res.spectrum.com. [174.45.99.30]) by smtp.gmail.com with ESMTPSA id n19-20020a170902969300b001b0358848b0sm4276551plp.161.2023.07.12.11.01.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 11:01:48 -0700 (PDT) From: Tim Gardner <tim.gardner@canonical.com> To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/6] swiotlb: use wrap_area_index() instead of open-coding it Date: Wed, 12 Jul 2023 12:01:38 -0600 Message-Id: <20230712180141.713006-4-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230712180141.713006-1-tim.gardner@canonical.com> References: <20230712180141.713006-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions <kernel-team.lists.ubuntu.com> List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe> List-Archive: <https://lists.ubuntu.com/archives/kernel-team> List-Post: <mailto:kernel-team@lists.ubuntu.com> List-Help: <mailto:kernel-team-request@lists.ubuntu.com?subject=help> List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" <kernel-team-bounces@lists.ubuntu.com> |
Series |
Azure: CPU lockup in CVM instances
|
expand
|
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index 9e1f88cebb17..7d55c0fb2678 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c @@ -655,10 +655,7 @@ static int swiotlb_do_find_slots(struct device *dev, int area_index, /* * Update the indices to avoid searching in the next round. */ - if (index + nslots < mem->area_nslabs) - area->index = index + nslots; - else - area->index = 0; + area->index = wrap_area_index(mem, index + nslots); area->used += nslots; spin_unlock_irqrestore(&area->lock, flags); return slot_index;