From patchwork Wed Feb 3 17:34:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 41927 X-Patchwork-Delegate: azanella@linux.vnet.ibm.com Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B913539AC86E; Wed, 3 Feb 2021 17:34:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B913539AC86E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1612373672; bh=A+Uty8JFV6H5alh7v93HDCOkumWtCN+9lDP6uT3taNM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=S0dgyKSonofu0+9yuleOj4jLtwaxiPjcRqcOlSsBBujjclhXyPqB7rx+GPe4MLy5Z rJLjHlKQO07eyw8r95zzq0J0T/rnHStO2OSzy2ANLiY/ilkZMxzFRgaI95KVrpgF+b KwjDeYN9CoeWq9YH/AQzQ/JDDTQn2+u1vf82Q8T8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from donkey.elm.relay.mailchannels.net (donkey.elm.relay.mailchannels.net [23.83.212.49]) by sourceware.org (Postfix) with ESMTPS id 2F2AE395040B for ; Wed, 3 Feb 2021 17:34:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2F2AE395040B X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1FBF51236D1; Wed, 3 Feb 2021 17:34:28 +0000 (UTC) Received: from pdx1-sub0-mail-a56.g.dreamhost.com (100-96-17-21.trex.outbound.svc.cluster.local [100.96.17.21]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id A8B181218BD; Wed, 3 Feb 2021 17:34:27 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a56.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.17.21 (trex/6.0.2); Wed, 03 Feb 2021 17:34:28 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Unite-Shoe: 7552647904a08215_1612373667946_4032385038 X-MC-Loop-Signature: 1612373667946:3910074196 X-MC-Ingress-Time: 1612373667946 Received: from pdx1-sub0-mail-a56.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a56.g.dreamhost.com (Postfix) with ESMTP id 719F77F097; Wed, 3 Feb 2021 09:34:27 -0800 (PST) Received: from rhbox.intra.reserved-bit.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a56.g.dreamhost.com (Postfix) with ESMTPSA id 84C267ED30; Wed, 3 Feb 2021 09:34:25 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a56 To: libc-alpha@sourceware.org Subject: [PATCH 3/3] x86: Use SIZE_MAX instead of (long int)-1 for tunable range value Date: Wed, 3 Feb 2021 23:04:06 +0530 Message-Id: <20210203173406.2075480-4-siddhesh@sourceware.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210203173406.2075480-1-siddhesh@sourceware.org> References: <20210203173406.2075480-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3495.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Cc: fweimer@redhat.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" The tunable types are SIZE_T, so set the ranges to the correct maximum value, i.e. SIZE_MAX. Reviewed-by: Adhemerval Zanella --- sysdeps/x86/dl-cacheinfo.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h index e0a72568d8..6f91651f0d 100644 --- a/sysdeps/x86/dl-cacheinfo.h +++ b/sysdeps/x86/dl-cacheinfo.h @@ -917,14 +917,14 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) rep_stosb_threshold = TUNABLE_GET (x86_rep_stosb_threshold, long int, NULL); - TUNABLE_SET_WITH_BOUNDS (x86_data_cache_size, data, 0, (long int) -1); - TUNABLE_SET_WITH_BOUNDS (x86_shared_cache_size, shared, 0, (long int) -1); + TUNABLE_SET_WITH_BOUNDS (x86_data_cache_size, data, 0, SIZE_MAX); + TUNABLE_SET_WITH_BOUNDS (x86_shared_cache_size, shared, 0, SIZE_MAX); TUNABLE_SET_WITH_BOUNDS (x86_non_temporal_threshold, non_temporal_threshold, - 0, (long int) -1); + 0, SIZE_MAX); TUNABLE_SET_WITH_BOUNDS (x86_rep_movsb_threshold, rep_movsb_threshold, - minimum_rep_movsb_threshold, (long int) -1); + minimum_rep_movsb_threshold, SIZE_MAX); TUNABLE_SET_WITH_BOUNDS (x86_rep_stosb_threshold, rep_stosb_threshold, 1, - (long int) -1); + SIZE_MAX); #endif cpu_features->data_cache_size = data;