From patchwork Tue Mar 13 00:31:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 131400 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp109219ljb; Mon, 12 Mar 2018 17:32:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELu5BvoFKuHcT5H1cv345ZnCN4a+fcQq1kGryd7QVLIyHjqPMi1/92KyMLIwzcVqTpf+Z5yV X-Received: by 2002:a17:902:b185:: with SMTP id s5-v6mr9805691plr.109.1520901135791; Mon, 12 Mar 2018 17:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520901135; cv=none; d=google.com; s=arc-20160816; b=gat65Rn+I1AbLl9VJm29jKs0R7DRyPFkWzWQzLIsjdtfKCUW8Bj5586R5U7LTVOyYq c1u8hECVkoihuecxFYpy5eIPGfdVmNKWz8SyG3KBPNhlzMRsFikkAQquN9Z13sUFBlq1 P9Yac9VjPQdHW+689DVQ6moivxr4FrUEl39gmAnnEIdtqvDZYuFjgqWSalKySkK6wtCF O5KjXrCOVjCs0X1YOJDaSQWg8J4K3aM3WoqH2wnwSaJ1fiExNUa6MLGek6KCPKt1Ci47 XOoMakge7LTFUJhQX/OVd9qpwWnni/qV3v9KSVni0FZzsQWGh//eJaIacCqNi+7rxQxS H3ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=9kxu1z+/ujJKArDNB/73zDv2nMGsu8gPcFPIp0kFd0E=; b=oEiGB5pnUlO2ophj27oSxIVNZYxuGRlrW7X5h4211qmTFKLP38IK9JiTnGQoXfgN3l GigkH/Uhy0z4pKrnCIqlBuU95NNmLOmvUCYjZmc2XSiCCU7WuYDvHsG1oTyKe16b4BwI w4RjVI0VcHETGThxouOruGyoWoVNR+uzJng3X79Sz4BF4VxnOr5rJcVTiTegdHdTdZFF woUuILgFWjCIPhwuzjyJCljjlgNlsuUzotvQTAkMLJlkLG4xB96H4VSqG3wks4RZXb2B 8bIcIUdy7QDJWcWlhq3h0gpZ9wxUlSg9rlLvjkxULWxHcd3Ep/cvZaLtf/VLn+zBAKj+ nj1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BvoSZlVF; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id bg11-v6si6903522plb.194.2018.03.12.17.32.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Mar 2018 17:32:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BvoSZlVF; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0879B224488AE; Mon, 12 Mar 2018 17:25:54 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c00::243; helo=mail-pf0-x243.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3F263224872AC for ; Mon, 12 Mar 2018 17:25:53 -0700 (PDT) Received: by mail-pf0-x243.google.com with SMTP id u5so5116840pfh.6 for ; Mon, 12 Mar 2018 17:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FxkRPZE+ohZU0je4CrHrRuB7F+xklm6biQAiVMp2jlE=; b=BvoSZlVFCPA1K5upVgZ19Sgy85ITIXfbGEyIx1l+ZaAs2mwB3PZNXhzcOX44XPNPgd s+BqtjWfYE5aX53FvWq3GpN1gQBWIo1F86NHLhL36pAFgqHpVq//UPvnbQV6SHJ4yDLm uIMwFVt3bIaIkTOkNbIWky/n+isbnRRfOri4k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FxkRPZE+ohZU0je4CrHrRuB7F+xklm6biQAiVMp2jlE=; b=h0IEW0wsb+JjqczIpWX9JyOsKMi97yRehSENzbia/rlGzYkylnBlcySy2/8Q3dJMs3 cWPO2BlkFdNcKJ5jV1qTBJJdjOI/BWx9TumMbIFF8SJcepLadaA47GeSi0NZV2On4GPG gyG2bXuRxtONU9s8P94QuQeKJ9S+cy2EaCV15sEIw5qr4LzyhHg0OSieNuaAsekPgvJ+ XpsnD9GS+nmZJbHt6AQzpH+bm2JvCrURATMruJN+Vjyi2YhmW0O0jEgeLcLAiGxkLDZ5 lqL8I3MnhCrn48RBLhCDDX4FO9VWDw5Bcc63LouCXVyw2OSybCHDgLaAYuPRzMiMcWgB 8pAA== X-Gm-Message-State: AElRT7Gmux7qUqABGPvKSCsleY5YXG9DV8eVxvVxx6MKtApdSUrXjCM6 P3qY+FIM7BE0l0KAA+nm1Q4vkef1wlM= X-Received: by 10.98.215.81 with SMTP id v17mr9849381pfl.110.1520901133980; Mon, 12 Mar 2018 17:32:13 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.76]) by smtp.gmail.com with ESMTPSA id p3sm16104145pga.45.2018.03.12.17.32.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Mar 2018 17:32:13 -0700 (PDT) From: Heyi Guo To: edk2-devel@lists.01.org Date: Tue, 13 Mar 2018 08:31:30 +0800 Message-Id: <1520901090-96694-2-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520901090-96694-1-git-send-email-heyi.guo@linaro.org> References: <1520901090-96694-1-git-send-email-heyi.guo@linaro.org> Subject: [edk2] [PATCH v2 1/1] ArmPkg/TimerDxe: Add ISB for timer compare value reload X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Heyi Guo , Yi Li , Leif Lindholm , Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" If timer interrupt is level sensitive, reloading timer compare register has a side effect of clearing GIC pending status, so a "ISB" is needed to make sure this instruction is executed before enabling CPU IRQ, or else we may get spurious timer interrupts. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Heyi Guo Signed-off-by: Yi Li Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Marc Zyngier --- Notes: v2: - Use ISB instead of DSB [Marc] - Update commit message accordingly. ArmPkg/Drivers/TimerDxe/TimerDxe.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmPkg/Drivers/TimerDxe/TimerDxe.c b/ArmPkg/Drivers/TimerDxe/TimerDxe.c index 33d7c922221f..32abee8726a0 100644 --- a/ArmPkg/Drivers/TimerDxe/TimerDxe.c +++ b/ArmPkg/Drivers/TimerDxe/TimerDxe.c @@ -337,6 +337,7 @@ TimerInterruptHandler ( // Set next compare value ArmGenericTimerSetCompareVal (CompareValue); + ArmInstructionSynchronizationBarrier (); ArmGenericTimerEnableTimer (); }