Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1109137rwn; Thu, 8 Sep 2022 13:38:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR43JFbGqo4kFm6ss73LSRP2u9Cr70MNMBiOS/WRnua7p/YlyqnDDL7dP8Ivt+X7ndpI3Yj5 X-Received: by 2002:a05:6512:32c5:b0:48b:fa9f:a98f with SMTP id f5-20020a05651232c500b0048bfa9fa98fmr3132677lfg.335.1662669497557; Thu, 08 Sep 2022 13:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662669497; cv=none; d=google.com; s=arc-20160816; b=qbvz1mIc7O/8QJAJWmidftx2IlbAy29cF2OusSchnEe6qIt7q3txFRbYxAM/eJ6tAY CHjFmhEidt+o4pplkuKt9ULH+ebFOWfmnOZen/toZkXHOAgiwALzc3cHXw1SSnWhhR6R b4GB2Dj6lcQ2zYQumPipO8Ww4dcEYervYesuI6Fw5yDpoBqd5qkVaZPpbK0Ks61qykW0 5LDOBlKbM14cSDQyEWsMpQfWHzT+9NTkzUR18MSynH5ruq+47NvxyAbc0H7GEzj73cVy pWwZ/HhPfNgoNwsWXx5jun78GO7KS+csexEM6ieTIb7ujxcXVr4kTpZaAH3iGIbAx9Er 5tmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id:dkim-signature; bh=omuRsfdH4SASi5AXCw7JGKydIaf3lsqyRLYETVJdhrw=; b=cLqCWTNpZdhg/BDyj4cIcz9U7GyoHTfxvoXiHA+ndz1+VzEnncJgZYv2T+Agg7b6i0 fV1xF68IimW8OcePpy1yMsMetm350RWzed5msR6LWfLmBMvKo//epNUFmsuMdCHMES6o qujENivtVbsDIqgMZIR9lDf0VGdZ16bTLzb0EL8Zu7sTP+w5T/T8hBx6XfNVzhd6wFAK 9YfjKekgTw87E81Vg0fw5U5n9SeHQY23JOotg6/5ejfL1EJNDq7nZb01TqxMAuAyfWN3 Klw+AH5Y1WYSajfFghoch87cQzCpik0Mxkhnyv7SwGqT5g9Kw5umpdP6EJ6OMfMoB3Pl ewoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Pp4Dugk6; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2-20020ac25462000000b0049461767b80si9188728lfn.106.2022.09.08.13.37.48; Thu, 08 Sep 2022 13:38:17 -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=@redhat.com header.s=mimecast20190719 header.b=Pp4Dugk6; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229661AbiIHT5Y (ORCPT + 99 others); Thu, 8 Sep 2022 15:57:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229647AbiIHT5V (ORCPT ); Thu, 8 Sep 2022 15:57:21 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81CACA50D4 for ; Thu, 8 Sep 2022 12:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662667039; 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: references:references; bh=omuRsfdH4SASi5AXCw7JGKydIaf3lsqyRLYETVJdhrw=; b=Pp4Dugk6jLOzeoauI8kv3tyjeJOeUUTAuCuGWqwKPeuxGKAe5g12Pd4o2BmQ1APk+ahimi n0DNTuJV3cdX8AafJKtocV55gWKuruaydaQtlLZeMv4i5tPQ2iAcMqVMeItfYq26hnDGSy 2lTkujP0075cPwOiIKFdW+S5MH4A92s= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-554-L6ZgRyXdPK-C3UIZmB_0JA-1; Thu, 08 Sep 2022 15:57:16 -0400 X-MC-Unique: L6ZgRyXdPK-C3UIZmB_0JA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5A2B680231E; Thu, 8 Sep 2022 19:57:16 +0000 (UTC) Received: from fuller.cnet (ovpn-112-2.gru2.redhat.com [10.97.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 287F21121315; Thu, 8 Sep 2022 19:57:16 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id 253E1415BE29; Thu, 8 Sep 2022 16:54:07 -0300 (-03) Message-ID: <20220908195111.813208840@redhat.com> User-Agent: quilt/0.66 Date: Thu, 08 Sep 2022 16:29:03 -0300 From: Marcelo Tosatti To: linux-kernel@vger.kernel.org Cc: Frederic Weisbecker , Juri Lelli , Daniel Bristot de Oliveira , Prasad Pandit , Valentin Schneider , Yair Podemsky , Thomas Gleixner , Marcelo Tosatti Subject: [RFC PATCH 4/7] clockevent unbind: use smp_call_func_single_fail References: <20220908192859.546633738@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Convert clockevents_unbind from smp_call_function_single to smp_call_func_single_fail, which will fail in case the target CPU is tagged as block interference CPU. Signed-off-by: Marcelo Tosatti Index: linux-2.6/kernel/time/clockevents.c =================================================================== --- linux-2.6.orig/kernel/time/clockevents.c +++ linux-2.6/kernel/time/clockevents.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "tick-internal.h" @@ -416,9 +417,14 @@ static void __clockevents_unbind(void *a */ static int clockevents_unbind(struct clock_event_device *ced, int cpu) { + int ret; struct ce_unbind cu = { .ce = ced, .res = -ENODEV }; - smp_call_function_single(cpu, __clockevents_unbind, &cu, 1); + block_interf_read_lock(); + ret = smp_call_func_single_fail(cpu, __clockevents_unbind, &cu, 1); + block_interf_read_unlock(); + if (ret) + return ret; return cu.res; }