Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp426894imn; Fri, 29 Jul 2022 11:08:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tMbEX4+In4kib/W6DUoMR0wzpLaUoS3aa2SxgVTDtUZa6vXyP8z6TU4oRT2nSpy/nxsdDI X-Received: by 2002:a17:906:99c1:b0:6fe:b01d:134 with SMTP id s1-20020a17090699c100b006feb01d0134mr3773959ejn.598.1659118086106; Fri, 29 Jul 2022 11:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659118086; cv=none; d=google.com; s=arc-20160816; b=gl1beltE55ejLWpO5s8R/DuBIIJf6MS7H1slUQ/vY16lwJ1NxWYdD8/Se31gUQr/Gb glqqVmnJgj+RPmbq0/RITXYN4D+bJyKwKzmQQnTMeHIjcQVT2ET/ejVrnB1Vun4YS2fN rFVqB9j/rNz/vb2FAZsbYoRAQc3/QzXg89RM/aWe0Xs+YEUxra/bkyr3S5bi/rrK817D 8aebGHiabChBV0PikXuYsMzWytI7uk6OHjTkdZU51JNTxcJ5XXBwzdMiRLxPDFZl1UKe /obN7kTXWMEsgqT/9koxXlLLo0mm6KhiZadLhuqHX48/M+QSoWZgjXOi7pM/lNySM3yo 37hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=4pZFEPPW1rCD+FxOWH5IvuT+sX+ksBOFETw6F8Vgj8U=; b=BO8NxIpYrZjszeNBXF1uhDFvhhdymSpIjhGb49K+D3gYtEcrR4oMXyUkCag3O4Ko1D fSB5lNeeGbyjgy+m/1u5iQ9UFkg1ZNowWa1vfJ38jwNKW3B1PlRbjeJ9lHwKiIM2cSUP zzm2WWkU528DdyktgsV2946zULEqi+xAMrtpaywK+z8OzwX5K9B2BlUJT6/ItPs09BKv ZYjOC2XnxXINW0+4kQ+uYCoRIxx2nGnsOnby4j9/EqB46IVlxnKAmvDMlatvDVAwyBo/ lNRAhYb4MJVBvhLbhFTA7NFL+RUn0QfJ5hWfd+wfSvpyzi/fzZMpOcesgTRBjwuw1QGb o2Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=PRF5VNP2; 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=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wv6-20020a170907080600b00706b9787b43si4463060ejb.319.2022.07.29.11.07.33; Fri, 29 Jul 2022 11:08:06 -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=@xry111.site header.s=default header.b=PRF5VNP2; 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=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238423AbiG2Rzj (ORCPT + 99 others); Fri, 29 Jul 2022 13:55:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238415AbiG2Rzi (ORCPT ); Fri, 29 Jul 2022 13:55:38 -0400 Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D0EE7B1EA for ; Fri, 29 Jul 2022 10:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1659117333; bh=4pZFEPPW1rCD+FxOWH5IvuT+sX+ksBOFETw6F8Vgj8U=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=PRF5VNP27p6ja7lRqq7yVkXXSkaMOp+kkK03ZIOakIIior+DFJ3SIN8qilDlw4Ijy zmjfgYulz7PRICqylcVscRR7DuMzBUK2arHVt9ku1SPnki18CWp/DufnfFPrJbSHjS K3TkLuZ4TTxxnUzFvVD08daYPjn0Za5g5YRjwT30= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 6638D66898; Fri, 29 Jul 2022 13:55:31 -0400 (EDT) Message-ID: <7cad6e78014168a8906e130e1cf3809077d2bda7.camel@xry111.site> Subject: Re: [PATCH v4 0/4] LoongArch: Support new relocation types From: Xi Ruoyao To: Youling Tang , loongarch@lists.linux.dev Cc: linux-kernel@vger.kernel.org, WANG Xuerui , Huacai Chen , Jinyang He , Lulu Cheng Date: Sat, 30 Jul 2022 01:55:29 +0800 In-Reply-To: References: <32a74a218c76611f897fd1df1ad0059068621133.camel@xry111.site> <0179679b736aea7258981dec2d83107cce74dfc1.camel@xry111.site> <6b5d2188f93ed72b67a4bbb7116113f833fe1ee5.camel@xry111.site> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 MIME-Version: 1.0 X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2022-07-29 at 20:19 +0800, Youling Tang wrote: > On 07/29/2022 07:45 PM, Xi Ruoyao wrote: > > Hmm... The problem is the "addresses" of per-cpu symbols are faked: the= y > > are actually offsets from $r21.=C2=A0 So we can't just load such an off= set > > with PCALA addressing. > >=20 > > It looks like we'll need to introduce an attribute for GCC to make an > > variable "must be addressed via GOT", and add the attribute into > > PER_CPU_ATTRIBUTES. > Yes, we need a GCC attribute to specify the per-cpu variable. GCC patch adding "addr_global" attribute for LoongArch: https://gcc.gnu.org/pipermail/gcc-patches/2022-July/599064.html An experiment to use it: https://github.com/xry111/linux/commit/c1d5d70 This fixes "modprobe x_tables" for me. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University