From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A215C07E96 for ; Tue, 6 Jul 2021 11:03:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7368161A3E for ; Tue, 6 Jul 2021 11:03:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231357AbhGFLGB (ORCPT ); Tue, 6 Jul 2021 07:06:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:39212 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231216AbhGFLGA (ORCPT ); Tue, 6 Jul 2021 07:06:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7B28C61A2D for ; Tue, 6 Jul 2021 11:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625569402; bh=ud7aIy2xW6L/GOYeoo39u49rPYI3dll7lq+wQ+ciOe4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BQbuUdnDgQtcLJXpPJc4sZanYppBNtQwa2DxmyPrJdXN2XzivPmqBQUZDkxYMEoSE VJmmxKgZjcKuKeyjAJ6QKNtw0Sud1XK83e4+nz6+fqeoHmq+8NvPcTV3ZwkBzmLQB0 y1S8Sr0aH5KFsN83/3OoxVkhHvmdMPHTEshJvZ8dCTDqnSkFaM2VXkYnnD1Td8i/ec A7jg/8awWL67P01rjt3SOcVi8F4fVXLd5K3Lrvj28NAuXCBx3+Yxr5/oqaZ4BjcC4t tboReKLgRk3Krh1rYdgrb4i179fgJ/mg+BWOrKzN8+nZK9lzrKUmkkmx+Pa6ObfMLE M+tgf9R4agl7Q== Received: by mail-wm1-f47.google.com with SMTP id a5-20020a7bc1c50000b02901e3bbe0939bso1972766wmj.0 for ; Tue, 06 Jul 2021 04:03:22 -0700 (PDT) X-Gm-Message-State: AOAM533eibFknDOHqHvTkTxMpxp+h4btNc0u07Cjn425nFHUF+t3tZiy lUvKwefgDJhYi8zepS8NXzMFfczCCwpc2t11Mjc= X-Google-Smtp-Source: ABdhPJwl55C2KALILVSU+EPcVRmd3GczOpWAh6wKG3mCaKFhiYZaS2IoO4Lm3jf8lCB6OkVaR85eGcqaEqFoxDApb5k= X-Received: by 2002:a05:600c:3205:: with SMTP id r5mr4046217wmp.75.1625569401122; Tue, 06 Jul 2021 04:03:21 -0700 (PDT) MIME-Version: 1.0 References: <20210706041820.1536502-1-chenhuacai@loongson.cn> <20210706041820.1536502-18-chenhuacai@loongson.cn> In-Reply-To: From: Arnd Bergmann Date: Tue, 6 Jul 2021 13:03:05 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 17/19] LoongArch: Add multi-processor (SMP) support To: Huacai Chen Cc: Andy Lutomirski , Thomas Gleixner , Peter Zijlstra , Andrew Morton , David Airlie , Linus Torvalds , linux-arch , Xuefeng Li , Huacai Chen , Jiaxun Yang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Tue, Jul 6, 2021 at 6:18 AM Huacai Chen wrote: > +const struct plat_smp_ops loongson3_smp_ops = { > + .send_ipi_single = loongson3_send_ipi_single, > + .send_ipi_mask = loongson3_send_ipi_mask, > + .smp_setup = loongson3_smp_setup, > + .prepare_cpus = loongson3_prepare_cpus, > + .boot_secondary = loongson3_boot_secondary, > + .init_secondary = loongson3_init_secondary, > + .smp_finish = loongson3_smp_finish, > +#ifdef CONFIG_HOTPLUG_CPU > + .cpu_disable = loongson3_cpu_disable, > + .cpu_die = loongson3_cpu_die, > +#endif > +}; I would hope that these functions can be used across platforms without an abstraction layer in-between. Are these not all part of the either the CPU architecture definition or the firmware interface? Do you even expect to see non-SMP systems deployed widely enough that SMP support must be optional? On arch/arm64 we ended up always building SMP support into the kernel because practically everyone wants it. Arnd