Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp970778pxb; Fri, 22 Apr 2022 15:38:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymW9VtUK8b8D717bfI6Y0baWh/oqI1VtWkyaCwtTWPAuG1lrjCYujzx5mGefZxKaPCxnjx X-Received: by 2002:a17:90a:6781:b0:1cb:11f0:9c51 with SMTP id o1-20020a17090a678100b001cb11f09c51mr18685443pjj.243.1650667089479; Fri, 22 Apr 2022 15:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650667089; cv=none; d=google.com; s=arc-20160816; b=Icv86DQoe48vh9wJpq0en/aPg+4QrGGG1yFBUVblrsUbfBz3uxbn/g4xRxUfNAmE+w gYjMdAiWHfzMjh7qjQD0snHVgM35Ti8fhDGNYE8ekcgQm+DQJPCZj17XeVfJOjrHeUoT 7vU7qXfzZ1ZGqAuOifBVBo8FuNGEs3+ygrq4CfaLxzD6+ACR0fAXt48hJWBtQLSNzYvG JtInozGM99uOoalASna7g6iSGt09Q9Qn0/bj622IXtwCCsIxbckJUEgPIlqVdExnwdS+ Go9y87PgwcNv6FHc0rvKeJ+CW58RMo3TqcP4Z24kUZ09sEXyjvBEpS2hF6zZr9kZsF+E SMIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RX5iF0HtvkRBM2maUvoUXLZ+1rzQwjz1rJUJGgTLGgc=; b=qqnMKNTVAkydMDDyT+hQMKD4c2DpYz2BPS2sjEXwGE+Ptlqqaulh2DaDdEgN9x85F+ L9Jbh8M8vX0tzWcFW1PDSxerfaFbFF3Vb6Rl5+lQF/Rc/+9ejMQecbLp0EPMftfp0Glt 1cr9evUHaMqEQcRQXu5+voJGWDh7dcxzUvlux4/BHv3W7BSFT9iv2L826m5xFKTOY60t LssU1lIc1Y7gkKZlpz1HCL/qBv5k+ufG48hXcEmJVfQcuPqwl4JXYZzu3WthRYuNdyWx GLcCeSE376O7C6+weMIb64wiiEZoGgXc8LI2Z0Kcy7rtppJ9SapyWS/8O8pICD0QxiSh fXgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CfVifOM3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h5-20020a056a00218500b00505cc5e6ae9si9668680pfi.312.2022.04.22.15.38.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:38:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CfVifOM3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7BA912702D4; Fri, 22 Apr 2022 13:25:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388181AbiDUKOP (ORCPT + 99 others); Thu, 21 Apr 2022 06:14:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388116AbiDUKNt (ORCPT ); Thu, 21 Apr 2022 06:13:49 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 986CBBB9 for ; Thu, 21 Apr 2022 03:11:00 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id z6-20020a17090a398600b001cb9fca3210so4750370pjb.1 for ; Thu, 21 Apr 2022 03:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RX5iF0HtvkRBM2maUvoUXLZ+1rzQwjz1rJUJGgTLGgc=; b=CfVifOM3cHI3CnnB7pbqZiEHrIUZ8KSh9YgMU/iUgsbkX7GgNVDDJLuPLghfXfxVJs ALTUPSzGkgsuJL4opQTNkoYHM19lwWShNsrgXPD9cAB42eHfBT6BtsD0nM1dnOGTv2i+ R4QarCAmnTq5xHAe7JAbH5TLeZDGIgYbrAhSmhftQYtByfNYyOP3y1Dvsduf+x543P/F XuAtVF2tJhlPb3muDxc1j6XDps81zCF4vgztyB3ckWge6o0tRTXYYg2fbx/Dx5yIjl+Z 7RgBB/QB6FeDBN+ATwhcI+zL/uh08jDzOG2gga994WbI83IP7AGzSli6fm1dOBc45l73 RHyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RX5iF0HtvkRBM2maUvoUXLZ+1rzQwjz1rJUJGgTLGgc=; b=Z+kRJmDzkdHbLz4DC30H3SqAZD79tE/2Ggny5krqZDr2auEHjlchUs5ANc2Ji45Euz 0sdlVzm5SRQZ2YoJ2BtJdnCUI3CBZUiwN53DOO0Xc9S+7qCf5gPKmPP9rgNaUSFfNqFE TJaenKgdkjQuP4MTUpUl0+7kUBSUHezruVi0ml/Um8ucU94cjQGjYBlxnrDyCw7301mC 86iKTc8nVUAco1w2hIbD/Gkef8aYi+wZdK8xOyy+qclCC90FMZjPWIqblA+SgdR2EBiV 3gV/wGQCO4mdUfhhttWzNomokfh3H0udODwp1HbXid4xUW5lgJmWMAK+yRbOaqA7xIfD vrcA== X-Gm-Message-State: AOAM530YJbbawdDJT3x/sSBmrRjqblWVNkPlIliNRsLwP5rYaCrTrcmo a6VFF/cF9thPCbeZR4XDy0w= X-Received: by 2002:a17:902:9a0a:b0:158:a22a:5448 with SMTP id v10-20020a1709029a0a00b00158a22a5448mr25546443plp.20.1650535860130; Thu, 21 Apr 2022 03:11:00 -0700 (PDT) Received: from octofox.hsd1.ca.comcast.net ([2601:641:401:1d20:df13:3d47:8c92:6576]) by smtp.gmail.com with ESMTPSA id w196-20020a6282cd000000b0050ada022940sm2407806pfd.183.2022.04.21.03.10.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 03:10:59 -0700 (PDT) From: Max Filippov To: linux-xtensa@linux-xtensa.org Cc: Chris Zankel , linux-kernel@vger.kernel.org, Max Filippov Subject: [PATCH v2 04/10] xtensa: clean up excsave1 initialization Date: Thu, 21 Apr 2022 03:10:27 -0700 Message-Id: <20220421101033.216394-5-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220421101033.216394-1-jcmvbkbc@gmail.com> References: <20220421101033.216394-1-jcmvbkbc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE 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 Use xtensa_set_sr instead of inline assembly. Rename local variable exc_table in early_trap_init to avoid conflict with per-CPU variable of the same name. Signed-off-by: Max Filippov --- arch/xtensa/include/asm/traps.h | 4 ++-- arch/xtensa/kernel/traps.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/xtensa/include/asm/traps.h b/arch/xtensa/include/asm/traps.h index bfdb0af61b07..514376eff58c 100644 --- a/arch/xtensa/include/asm/traps.h +++ b/arch/xtensa/include/asm/traps.h @@ -57,11 +57,11 @@ void do_unhandled(struct pt_regs *regs); /* Initialize minimal exc_table structure sufficient for basic paging */ static inline void __init early_trap_init(void) { - static struct exc_table exc_table __initdata = { + static struct exc_table init_exc_table __initdata = { .fast_kernel_handler[EXCCAUSE_DTLB_MISS] = fast_second_level_miss, }; - __asm__ __volatile__("wsr %0, excsave1\n" : : "a" (&exc_table)); + xtensa_set_sr(&init_exc_table, excsave1); } void secondary_trap_init(void); diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index d6b1a0c3e319..95903f25e523 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c @@ -372,8 +372,7 @@ __init trap_set_handler(int cause, xtensa_exception_handler *handler) static void trap_init_excsave(void) { - unsigned long excsave1 = (unsigned long)this_cpu_ptr(&exc_table); - __asm__ __volatile__("wsr %0, excsave1\n" : : "a" (excsave1)); + xtensa_set_sr(this_cpu_ptr(&exc_table), excsave1); } static void trap_init_debug(void) -- 2.30.2