From owner-svn-src-all@freebsd.org Fri Jun 8 16:27:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1822101EF65; Fri, 8 Jun 2018 16:27:32 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt0-x236.google.com (mail-qt0-x236.google.com [IPv6:2607:f8b0:400d:c0d::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64C8369B35; Fri, 8 Jun 2018 16:27:32 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt0-x236.google.com with SMTP id i18-v6so13987207qtp.12; Fri, 08 Jun 2018 09:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GSOzT2A5lV4zf72PuKqs1WOX7k+6VqvZL5BC/LZ0nWU=; b=MV+Rr0KD8/5rNRzg36g0HV3mrUkmr941Oiq3S/hwfIfBdyiKuiGekypEY4hFMS5YL9 Nno835T+zAunb9a81c+RDfXNJIFhQZmLSsFpHqcMq3MU6w2H0rWgdkYPeCDTOaeMhQxe Hdc454lE69EUWDDZCY20ZpIDQdK6yAqswJ/cBM3nbq1tYSImD3VcLnNXlrUf6aNg0PjN 6Gtd8wQzFjAXf8hXqjZAhnEakYIPZdGvoTdoKfrGgFAydKjzCjmRxW3vzjCDeTWjATea vIcPiY5TB/wRRWxqUzuS4krPFr0ClZWnk3tFg9wrYVVMo5Nf+GJCD+SSC2Cd6nRmdtoQ fe+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=GSOzT2A5lV4zf72PuKqs1WOX7k+6VqvZL5BC/LZ0nWU=; b=H8/Ao629ZtVw9aWoFTr3j/cpyE28u2fB+iLPPpgK8MsSA9UuMOjArAxuhDdFiTBMpA DURhVHZtnlcbJppihqxaEXxKvjZML0T1K1AaWEqB8OKkzyY7VeFRztxJcTyWJriUKte2 P2rvTba9AYCdh5ooSMDPvPiGpTu05gHatU7TopTd0W83E4R0fGouj/3knDyRgOEkJ7fH Y8fTWj3ZxvfbPNwtryYxUfuVguxKFmhFt98gmNrz20Frk/pq44uDoq6aTLa3x901YMz/ 3C+5yCOvNf+6pNmI0fdRvnsqC0gQTNWDat+buldJ4BGXAnDGfx0FalFZqidAQoj4y77i 5snA== X-Gm-Message-State: APt69E0+hPA1RItB17nQfHR7V+k8Bpqr9QL/YoyZsJT85xKlF4Hwvvul mxlNQyDb5VB79OQd99oyOXK2wg== X-Google-Smtp-Source: ADUXVKKvi9WebIOwaqIQhLqMFSFWHKuz4Qun1jp7S58uXIiNjHHjDgihAKDk9X98cgjazF+OAdNfog== X-Received: by 2002:ac8:185c:: with SMTP id n28-v6mr6530163qtk.136.1528475251404; Fri, 08 Jun 2018 09:27:31 -0700 (PDT) Received: from pesky ([137.122.64.159]) by smtp.gmail.com with ESMTPSA id c37-v6sm15908897qtd.47.2018.06.08.09.27.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jun 2018 09:27:30 -0700 (PDT) Sender: Mark Johnston Date: Fri, 8 Jun 2018 12:27:01 -0400 From: Mark Johnston To: Matthew Macy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334827 - in head/sys: amd64/amd64 arm/arm dev/hwpmc i386/i386 kern mips/atheros mips/cavium powerpc/powerpc sys Message-ID: <20180608162701.GA65388@pesky> References: <201806080458.w584w3rn006318@repo.freebsd.org> <20180608143448.GB57885@pesky> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2018 16:27:33 -0000 On Fri, Jun 08, 2018 at 09:07:53AM -0700, Matthew Macy wrote: > On Fri, Jun 8, 2018 at 07:35 Mark Johnston wrote: > > > On Fri, Jun 08, 2018 at 04:58:03AM +0000, Matt Macy wrote: > > > Author: mmacy > > > Date: Fri Jun 8 04:58:03 2018 > > > New Revision: 334827 > > > URL: https://svnweb.freebsd.org/changeset/base/334827 > > > > > > Log: > > > hwpmc: simplify calling convention for hwpmc interrupt handling > > > > > > pmc_process_interrupt takes 5 arguments when only 3 are needed. > > > cpu is always available in curcpu and inuserspace can always be > > > derived from the passed trapframe. > > > > > > While facially a reasonable cleanup this change was motivated > > > by the need to workaround a compiler bug. > > > > What is the compiler bug? Do you have disassembly of the subroutines in > > question? > > > > We talked about this online. Not in any more detail than is present in the commit message. > How would that help without engaging in a huge > diversion in to the toolchain? If you can provide C code and point to the bug in the disassembly, that should be enough for an LLVM bug report. I don't think that's a huge diversion. > There is nothing wrong with the C code so I > resorted to a voodoo fix to get hwpmc working again. If you're volunteering > mjg or I or you can disassemble the code prior to my change. I'll volunteer to look at the disassembly, sure. "Nothing wrong with the C code" isn't the bar for claiming a compiler bug though. The fact that our NMI handler isn't re-entrant can lead to subtle problems. If while executing the NMI handler we hit a dtrace probe or DDB breakpoint, the iret executed upon return to the handler will re-enable NMIs. Then, if a second NMI arrives before the handler for the first has returned, the trapframe will be clobbered. Did you rule out an issue like this?