Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3063996pxb; Fri, 12 Feb 2021 08:19:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIREdh7MUl/Ld/KvnRuI7KeiTGuHWebBnwkCT9sYA8EKYbjhsRt8qyaKtOm7lmRcPWaUPh X-Received: by 2002:a17:906:a57:: with SMTP id x23mr3738548ejf.40.1613146772508; Fri, 12 Feb 2021 08:19:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613146772; cv=none; d=google.com; s=arc-20160816; b=MoGZ/0UVybdAOXd4rsQw9CIxjvX4X8e3L9GMPsLifpOjPFsF8iG6lr1sqcgYlfYZKT mzH8dgYrFYxIeFTEsw4WHiRT4QQllK/xSxnv6oiDzJV/lMc7Sgd/3r+2uoqrzLCJnspu qUrqIRCvrIlpiQzNLr78mhA9EQzoFkzNCXucKr37PnIg7d1oJ0G13TflD5sji6DF9JUF KwAfxMxBw9nqB+yLBH2fBMnB/xkfmp/dAFBQDk5Z/D4tgVhgHdKCcUX2W5tlxp1Ga+jf J3inJ9y/+gtwsgf3iOX6WkhqpYRisp8znNg3h70IfHE5Tf5APGqzjHQRDBuMkUrXjiWg I+Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=b2lTZJ9hOG6B4paR/QRRh1k2aw5uLfzbbaH35EaZq2U=; b=MptlfTmSP5e8ba/ahc2PfCdN4/sUfJDFy0HovvG6MCXTkNj57A9B7+W5w1krawYNvI ncEtWiFonOsVNnJarpBC4SiAkkaGSnw+XKDfi2LmSbG/SCl75UcptU81dhQ4vJhFvExX iVGzqzHit3Oq9+Lew0uYEqpu6iRvjEm4YKOAigUNFUosY0uV0p4wlaBkGZDDmx47z4yI uPrYIsACDEP0MAeKsv/j3V/P7htJd3mfgO+z4N152l9LvxSU1dT53+fMXXjxBDWWtK5e KS58iu3m9K1f8NqcUCdyp/vrt7wIAsLXXrjHDCLxxNAU9kpdw61iKAx+Jmh/W2DgeAx/ ulSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NEeqsLy1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si6616376ejg.86.2021.02.12.08.19.07; Fri, 12 Feb 2021 08:19:32 -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=@redhat.com header.s=mimecast20190719 header.b=NEeqsLy1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230047AbhBLQQU (ORCPT + 99 others); Fri, 12 Feb 2021 11:16:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41603 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbhBLQQS (ORCPT ); Fri, 12 Feb 2021 11:16:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613146490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b2lTZJ9hOG6B4paR/QRRh1k2aw5uLfzbbaH35EaZq2U=; b=NEeqsLy1LYkTC+hlBnwFdJvbniRrQWs9S8vk4XQTSRgcmYFr9RZ7hpjY62pbCFZAUyURv6 e+cTvjMoNnBmd+4o3j5ex9xAts5183iW0aQcdrEmBJG2a/fhIxSO4OuuN1yvOUvOX/+wGT A7hpqneB3LQy/+q3CO4FehZQMLyaB5Y= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-317-Zcg1pYC9MbqAj3D-9A8XyQ-1; Fri, 12 Feb 2021 11:14:46 -0500 X-MC-Unique: Zcg1pYC9MbqAj3D-9A8XyQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9CE2B85B660; Fri, 12 Feb 2021 16:14:43 +0000 (UTC) Received: from treble (ovpn-120-169.rdu2.redhat.com [10.10.120.169]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 43E395D6AB; Fri, 12 Feb 2021 16:14:42 +0000 (UTC) Date: Fri, 12 Feb 2021 10:14:39 -0600 From: Josh Poimboeuf To: Jason Gerecke Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Jason Baron , Jason Gerecke , Steven Rostedt , Ard Biesheuvel Subject: Re: [PATCH] RFC: x86/jump_label: Mark arguments as const to satisfy asm constraints Message-ID: <20210212161439.pkrw6cpbfqhafrnk@treble> References: <20210211214848.536626-1-jason.gerecke@wacom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210211214848.536626-1-jason.gerecke@wacom.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 11, 2021 at 01:48:48PM -0800, Jason Gerecke wrote: > When compiling an external kernel module with `-O0` or `-O1`, the following > compile error may be reported: > > ./arch/x86/include/asm/jump_label.h:25:2: error: impossible constraint in ‘asm’ > 25 | asm_volatile_goto("1:" > | ^~~~~~~~~~~~~~~~~ > > It appears that these lower optimization levels prevent GCC from detecting > that the key/branch arguments can be treated as constants and used as > immediate operands. To work around this, explicitly add the `const` label. > > Signed-off-by: Jason Gerecke > Cc: Steven Rostedt > Cc: Ard Biesheuvel > --- > Marked RFC since I'm not familiar with this subsystem or the asm blocks that > are impacted. Extra-close inspection would be appreciated. Acked-by: Josh Poimboeuf -- Josh