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=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 5E1D2C2D0EF for ; Fri, 17 Apr 2020 19:31:32 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13F472051A for ; Fri, 17 Apr 2020 19:31:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13F472051A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vt.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1jPWhU-0005ed-QQ; Fri, 17 Apr 2020 15:30:56 -0400 Received: from omr1.cc.ipv6.vt.edu ([2607:b400:92:8300:0:c6:2117:b0e] helo=omr1.cc.vt.edu) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jPWhS-0005eX-3I for kernelnewbies@kernelnewbies.org; Fri, 17 Apr 2020 15:30:54 -0400 Received: from mr6.cc.vt.edu (mr6.cc.vt.edu [IPv6:2607:b400:92:8500:0:af:2d00:4488]) by omr1.cc.vt.edu (8.14.4/8.14.4) with ESMTP id 03HJUpG0007301 for ; Fri, 17 Apr 2020 15:30:52 -0400 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mr6.cc.vt.edu (8.14.7/8.14.7) with ESMTP id 03HJUkad012284 for ; Fri, 17 Apr 2020 15:30:51 -0400 Received: by mail-qk1-f197.google.com with SMTP id z8so2988858qki.13 for ; Fri, 17 Apr 2020 12:30:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :mime-version:content-transfer-encoding:date:message-id; bh=hny2iFG2Lc28htMdk2NYwDm0BsGQmkQy8cM4/kwuGaM=; b=jBeWdbk50Kn0AdAGpUtpvMgzpskZbIPHWdOTf7E1dNLAAztMB9BD3VsHF4emJ4ZKf7 mddoCBaeGru1jUIqu6JU/qOwcz7s3DO+MMcFGuSqOz6oFczaWPkqTHecepE3uffG7v/r W7YHDfu02TYjrK/sgv44X7LvOSXdq7Wrn8NPCw5ISJBcFj1RfGeOTtbBIn6HzflvMBXK lOlPzTT3IXPsGg+/oNTtu1p/oz6KAWfI2edBUxjhRYFYED8Wz0Gp3qDgm3KE6+51sYe2 TjYHJr9Kig6Rjtt6sWxEquT7SiiVGV9wkBzzWkx+2PSWqA5b2GB8ATUkUlHM6tsiddLY a+mw== X-Gm-Message-State: AGi0PuZawokk/xxDYckTwJKrN8m8fIk6yYyHUkSaOInG00Yg1eVmVoz8 lzhO8LWm0IXF1qezQhrZEUEoU7p78L6fbwMt9KhcBX6kHE1WmGqk5mynPysGZPeGmNcDJnbR09K MuB32c+G+i5XmCrFOmMHS8kPkFarPEquKlSR6YmM= X-Received: by 2002:ae9:f30f:: with SMTP id p15mr4836690qkg.178.1587151846677; Fri, 17 Apr 2020 12:30:46 -0700 (PDT) X-Google-Smtp-Source: APiQypLNGCsFJgZk0SHeKnas3AyqBV0cURMWamyr3/inqtjRqcCCtHyWwcmYOilLVDQHNzf+9LSb3Q== X-Received: by 2002:ae9:f30f:: with SMTP id p15mr4836522qkg.178.1587151844396; Fri, 17 Apr 2020 12:30:44 -0700 (PDT) Received: from turing-police ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with ESMTPSA id r128sm17679910qke.95.2020.04.17.12.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Apr 2020 12:30:42 -0700 (PDT) From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Google-Original-From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev To: "s.achterop@rug.nl" Subject: Re: Trouble with allocating memory on platform driver In-Reply-To: References: <22fae602-5d4c-f585-8fb0-89a0884011ad@rug.nl> <07083b3a-2264-8b95-29cc-c0b3f6eb8250@rug.nl> Mime-Version: 1.0 Date: Fri, 17 Apr 2020 15:30:42 -0400 Message-ID: <147577.1587151842@turing-police> Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============4673257122210320863==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============4673257122210320863== Content-Type: multipart/signed; boundary="==_Exmh_1587151841_43372P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1587151841_43372P Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, 17 Apr 2020 10:47:33 +0200, =22s.achterop=40rug.nl=22 said: > I found a working solution. I actually don't know what I am doing = but it works. > Before the call to dma_zalloc_coherent I added: > > pdev->dev.coherent_dma_mask =3D 0xffffffff; DMA_BIT_MASK(32) rather than a hex constant would be a better choice. > > Now it works. Note that =22works=22 and =22is correct=22 are two different things. Tha= t should be a mask that tells how many bits of the value are actually used by the har= dware. On most 32-bit systems, 32 will be correct, but there's other values in u= se (on S/390, it's either 31 or 64 bits, the PowerPC can have 44, and the ol= d PNP stuff on x86 weirds out at the 24-bit line). --==_Exmh_1587151841_43372P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQIVAwUBXpoD4QdmEQWDXROgAQLPpQ//bg8e1LGOF5EvGSDXVtEfOT/Atyf2YRxh Held7DbYLrq/Hzgc0neXQm2PywQ/uRZoea6BMxpR1BfKA289sk1CsONdLvBTA0n7 +xe5rNcjOHlca+9cBPxrb6ac1/UsBJx3Wq/UxSeemWzhGhnn3FBtHCUNu/ecr7iQ 68sODu8Q7Cxw9xD1/p2hdy5mzvw+08UtD3SDvoU72ygHBnMw7mgP9r4+Uq3wSmma obMGwcHR0F2GnAvMYjiOQiifGeSHnQswTq64HYCfFnFrQVHuGxMM27gyD60nq1yF bidTqTFMFHvPQ9tD5X1YsyxI8nxCZUUuuZwfBIjynocASzEfYDquDPBEBMNLn7Np +7v3LOaG84SvCSZI2cqmSyrNYp3DVKMC4HQaWvSFIXO+4KPtXJPb58hXpYBvan8Q hQUrtgy9wQkMn6oW3rjZG4sxPUXurC2Z/PLpYyl1Z/2wEoSRijzd6sWZXGy/Gnme 2ZJGYorQxyz8nD5CV51Z0S72CiU0yWP4AFaMv69nrAzqEoeIlWvkOuDjVEPmXOFy ARCEpAGZtl5UuOp/ufJdMKvm8NmpjyRsWxrT0F7WJcCzVHlMWY9x3cn2csu4yKxc Q+Yx236jCHTHrdUyWdiLsxrD0N6hy8PWIM3fwJqpdFWhcpcA7KwJmDn4PUq16Jbc fvPRXK2+BCo= =V02t -----END PGP SIGNATURE----- --==_Exmh_1587151841_43372P-- --===============4673257122210320863== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============4673257122210320863==--