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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 A7E2EC43603 for ; Thu, 19 Dec 2019 11:39:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6B74524672 for ; Thu, 19 Dec 2019 11:39:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="GuBNNihE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B74524672 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 030818E0167; Thu, 19 Dec 2019 06:39:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F237B8E00F5; Thu, 19 Dec 2019 06:39:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E39A98E0167; Thu, 19 Dec 2019 06:39:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0201.hostedemail.com [216.40.44.201]) by kanga.kvack.org (Postfix) with ESMTP id CAA378E00F5 for ; Thu, 19 Dec 2019 06:39:52 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 71DA01F1A for ; Thu, 19 Dec 2019 11:39:52 +0000 (UTC) X-FDA: 76281696624.16.camp77_561ea3e576d22 X-HE-Tag: camp77_561ea3e576d22 X-Filterd-Recvd-Size: 2948 Received: from ozlabs.org (ozlabs.org [203.11.71.1]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Thu, 19 Dec 2019 11:39:51 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 47dqfp0phfz9sPK; Thu, 19 Dec 2019 22:39:45 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1576755588; bh=rOd+nUIEAzAccp3PvRcR200yxlaugVwsQre4gumsVdc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=GuBNNihEtBtqIz8PqGhjM6g/zMOYVEL6mEUgziDE4XQ5A0lV69T+E/Z4FygDzUKYi 1aB5r22ApjjAnp1a9bLKTD9Gculf/iN3v3eQvfR+mlLqBCS60Ja+CHq3Sa8xEfW/+I G0Y643D0cLV2B2hR8Dz8aZiFiCuQkumA0c4z3JkETsq1/vVrrsa8HAOuUVyWt8iT4M EO0q/UZCm+qtb6LF8+yC/e1e9hGQJaJDC/X4LPpXaFB3BLOzQEIjxCgmOJO7jmre7W NINk2k5dK/lpnVKR9izw+rp0NRUsbiMWnkYJZFzIoxz7TucWhPhAKY3hSCmLFlidPK q6UYMkUn/tGHA== From: Michael Ellerman To: Dave Hansen , Michal =?utf-8?Q?Such=C3=A1nek?= Cc: linux-arch@vger.kernel.org, fweimer@redhat.com, aneesh.kumar@linux.ibm.com, x86@kernel.org, linuxram@us.ibm.com, shuahkh@osg.samsung.com, mhocko@kernel.org, linux-mm@kvack.org, mingo@redhat.com, Sandipan Das , linux-kselftest@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, bauerman@linux.ibm.com Subject: Re: [PATCH v15 06/23] selftests/vm/pkeys: Typecast the pkey register In-Reply-To: <15c3b6cc-d8da-9a32-da6a-4c3990f48994@intel.com> References: <719ec65756a64cc03e8464a9c6da51c4519d2389.1576645161.git.sandipan@linux.ibm.com> <5b6c3f8a-9d2f-2534-c072-89f130ce110f@intel.com> <20191218205905.GG4113@kitsune.suse.cz> <15c3b6cc-d8da-9a32-da6a-4c3990f48994@intel.com> Date: Thu, 19 Dec 2019 22:39:44 +1100 Message-ID: <87d0ckmtmn.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Dave Hansen writes: > On 12/18/19 12:59 PM, Michal Such=C3=A1nek wrote: >>> I'd really just rather do %016lx *everywhere* than sprinkle the >>> PKEY_REG_FMTs around. >> Does lx work with u32 without warnings? > > Either way, I'd be happy to just make the x86 one u64 to make the whole > thing look more sane, It's userspace so you don't get u64, you only get __u64. And then you'll hit the fact that by default __u64 is unsigned long on powerpc and unsigned long long on x86, meaning you still can't use the same printf specifier. To avoid that you should define __SANE_USERSPACE_TYPES__ before including any headers, and then you'll get unsigned long long for __u64 everywhere and you can just use %llx. cheers