Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19481535rwd; Wed, 28 Jun 2023 09:50:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6pb3+0weeEYozo8Vv8T9AO0Ml6/4D7SJomo0EZUWFV9ighW0x1G/XbZ2tx9ovChxBn4bmj X-Received: by 2002:a05:6a20:96c6:b0:12c:a57:6e46 with SMTP id hq6-20020a056a2096c600b0012c0a576e46mr2356376pzc.18.1687971030996; Wed, 28 Jun 2023 09:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687971030; cv=none; d=google.com; s=arc-20160816; b=fx/jLwRG1QXmTkK1w1du8wOHvBnNQ/0rNXqLGvynVrxaNv890J4lLmS65CQKFioeMK JEQeHoclryvLegvtuQs1FRGw7PdckPvMEE+i25BcoZG41t/fy/ktPjqdkJWXVdWGOa6g 6IDqn1/I6fW3U6uqXyCgK5prnXNXTKpuYP6+o0Uz265vdHQ52X8dsVV2TxiExoDM6uY9 KUA0yyE/Rp63zYAZmm9F0TRdDrh8LjSqA73jJRJWxCMJo4I13phZCFIJj9OGIQeAvXSG j1kYO2tZhEHN6xfAa62dhJv0aS70yn/TJYHwfDcFTDpBXYwYmMxlROEPaJTcTTs8zbr4 SM8w== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ySGEGppcm6oWxfh7b51H3y7Kf8yvRv3xPKs1azC4E4k=; fh=nCHqR+kYJplZWIDXQqpf11pzUfOiFDPxeJVegClgIhE=; b=G9+q9u9QCvvsL4ss/rKSvZxrqgftuhKyQSL0FFgd1wKbBI5FvAUkMMzG6eoU5CPh9H IEC7uLji+pr+o24b14DYcdVQ3Gm03L4aMBhPB3iYBXctWgnl1R+OZsP1YYoCotH7R97d wOE9gLPOWqIbsaDfd7pFvadMgm1NmbZgov+39YUdokInwlJV+VGmxRvJ4fgadz2LDkkC ktNyL8kRzoZWynpaNNs3joF77z/jXsv8KCYxl/A1BHS/d8J0oNxwuBGOFIfvhCZKKNe+ idG7kAbhQcnQynrEkE/9NwqlHGOl0XczQItMGUHWuLgr8WgVAWJ9MS/D6lrwePT5xPIj vN/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Vefjteye; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c195-20020a624ecc000000b0066716dc507csi8598717pfb.400.2023.06.28.09.50.18; Wed, 28 Jun 2023 09:50:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Vefjteye; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231751AbjF1QYq (ORCPT + 99 others); Wed, 28 Jun 2023 12:24:46 -0400 Received: from mga02.intel.com ([134.134.136.20]:59533 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231537AbjF1QYo (ORCPT ); Wed, 28 Jun 2023 12:24:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687969484; x=1719505484; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=eTlpY6oRYUtQFRez87pCwiAALo1ql9cjRbAJSgFjALI=; b=VefjteyeXTAuWyTpRxwaNOaR4rwHRkOrGtCRjDrUnQDQQSzMrcQv2OVH gZDPWyDfxwNU+6Qg6GulAsRB9aXNfaLOvEeR0BWlAFxWsn9lFwSJzgiUj Hus+6QU7iZAUhk8OkBdy/Murnsitwf+R39fR3tqKY5ZQGFf5KYfcief0F 83oFe8HhUss2oVwXpW4j+VofR10WmCWFJQyFO0/FKZptwUQiwoARgwQyt /5HBPEKOGnIwM0h8PQ8xApb1HUw/Nq7aou6feza3tFQWo/2SwWAyNQPSJ LAOJxtomv59oXF7/FWLbW4t8+8h8NKEoaWks8WROREBjQJHyULIlnG9Om Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="351683549" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="351683549" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2023 09:23:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="711094924" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="711094924" Received: from atkalcec-mobl.ger.corp.intel.com (HELO intel.com) ([10.252.40.132]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2023 09:23:31 -0700 Date: Wed, 28 Jun 2023 18:23:29 +0200 From: Andi Shyti To: Arnd Bergmann Cc: "David S. Miller" , Kees Cook , Mark Rutland , "Peter Zijlstra (Intel)" , Arnd Bergmann , Guenter Roeck , Geert Uytterhoeven , Ingo Molnar , Andi Shyti , Andrzej Hajda , Palmer Dabbelt , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sparc: mark __arch_xchg() as __always_inline Message-ID: References: <20230628094938.2318171-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230628094938.2318171-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, > An otherwise correct change to the atomic operations uncovered an > existing bug in the sparc __arch_xchg() function, which is calls > __xchg_called_with_bad_pointer() when its arguments are unknown at > compile time: > > ERROR: modpost: "__xchg_called_with_bad_pointer" [lib/atomic64_test.ko] undefined! > > This now happens because gcc determines that it's better to not inline the > function. Avoid this by just marking the function as __always_inline > to force the compiler to do the right thing here. > > Reported-by: Guenter Roeck > Link: https://lore.kernel.org/all/c525adc9-6623-4660-8718-e0c9311563b8@roeck-us.net/ > Fixes: d12157efc8e08 ("locking/atomic: make atomic*_{cmp,}xchg optional") > Signed-off-by: Arnd Bergmann Acked-by: Andi Shyti Thanks, Andi