[{"id":1760530,"web_url":"http://patchwork.ozlabs.org/comment/1760530/","msgid":"<CAFEAcA9N2dx6feVbw0BJ_xbs9czjJvmOCZfoOjf4ddpVk4ikbQ@mail.gmail.com>","list_archive_url":null,"date":"2017-08-30T22:12:04","subject":"Re: [Qemu-devel] [PATCH v1 1/1] target/xtensa: Use the pre-defined\n\tMEMTXATTRS_UNSPECIFIED macro","submitter":{"id":5111,"url":"http://patchwork.ozlabs.org/api/people/5111/","name":"Peter Maydell","email":"peter.maydell@linaro.org"},"content":"On 30 August 2017 at 19:02, Alistair Francis\n<alistair.francis@xilinx.com> wrote:\n> Instead of using the hardcoded (MemTxAttrs){0} for no memory attributes\n> let's use the already defined MEMTXATTRS_UNSPECIFIED macro instead.\n>\n> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>\n> ---\n>\n>  target/xtensa/op_helper.c | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c\n> index 519fbeddd6..3d990c0caa 100644\n> --- a/target/xtensa/op_helper.c\n> +++ b/target/xtensa/op_helper.c\n> @@ -1025,11 +1025,11 @@ void HELPER(ule_s)(CPUXtensaState *env, uint32_t br, float32 a, float32 b)\n>  uint32_t HELPER(rer)(CPUXtensaState *env, uint32_t addr)\n>  {\n>      return address_space_ldl(env->address_space_er, addr,\n> -                             (MemTxAttrs){0}, NULL);\n> +                             MEMTXATTRS_UNSPECIFIED, NULL);\n>  }\n>\n>  void HELPER(wer)(CPUXtensaState *env, uint32_t data, uint32_t addr)\n>  {\n>      address_space_stl(env->address_space_er, addr, data,\n> -                      (MemTxAttrs){0}, NULL);\n> +                      MEMTXATTRS_UNSPECIFIED, NULL);\n>  }\n\nMight be worth noting in the commit that this is technically\na change of behaviour, because MEMTXATTRS_UNSPECIFIED\nsets the 'unspecified' field to 1 whereas {0} doesn't.\nI don't think anything actually checks that field, though.\n\nthanks\n-- PMM","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"LwDkHjeP\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjKWN5ssJz9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 08:12:48 +1000 (AEST)","from localhost ([::1]:52979 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnBE6-0004VD-Vz\n\tfor incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 18:12:47 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:54146)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dnBDn-0004V7-95\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 18:12:28 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dnBDm-0005RZ-9b\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 18:12:27 -0400","from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:35972)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <peter.maydell@linaro.org>)\n\tid 1dnBDm-0005RF-24\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 18:12:26 -0400","by mail-wm0-x22d.google.com with SMTP id u126so17860755wmg.1\n\tfor <qemu-devel@nongnu.org>; Wed, 30 Aug 2017 15:12:25 -0700 (PDT)","by 10.223.134.54 with HTTP; Wed, 30 Aug 2017 15:12:04 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=FwlaQg4EvmPN72MOiUxIam0PckmFmtkDOiHM364X/B0=;\n\tb=LwDkHjePW08Jqn+Nkh2QXuw5NGVVodDS/9XRjM2P+Od476fmYWL7q8uTe6pfl71Z06\n\t0PbgeK+tnig0adDHB2cKbOYOY18m5JOQjASkgQ4izd04F5/csA/PePq/Om7n1z3MftG4\n\tCsJYqk0dGJTwViMryQveEkwhhqp0bLYCWKkEU=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=FwlaQg4EvmPN72MOiUxIam0PckmFmtkDOiHM364X/B0=;\n\tb=MCWqCI7cUqDfeC9hdYg0xphIOA7z0SuBenqNl9sWedltWV7vjsZ8w/orrfjay3enrn\n\tWMnAFJpdfWd0X2QHLW1BqoZ6mFuen/TJNgQLcuWiHMKGpPLx3+/yXu3/aMroBDE9wj4Z\n\tdeEwef7u/9bsBPm4iqR3ayJYtdF0bMDFBNnnUxyRe99jVT89jJLNk8IeXlGT9rP8YAAx\n\t7HTgDTcMaSJImZHskb9Gyx7M732QN2PN1IB7v7jf8pmzwxAJGojaEfWMB9S165eAjC3l\n\tk3HCo2J3Tb2LppgUUmU7o49ymMYhj4PBEX4wejxZ2Ze1LczfFHOu447pi2s5J2XEZNQn\n\t/MbA==","X-Gm-Message-State":"AHYfb5gGk2R0CuRDdHxGLiRKZITtSXji60RJpOWvsYWo3OXnlWNOe+b+\n\tytd1nmpbE2YNvBcwb/oPAURNP9eyp3/6","X-Received":"by 10.28.58.199 with SMTP id h190mr1876481wma.82.1504131144855; \n\tWed, 30 Aug 2017 15:12:24 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<b35860a5f4377883fd2c2942bdb524d279a91de9.1504116039.git.alistair.francis@xilinx.com>","References":"<b35860a5f4377883fd2c2942bdb524d279a91de9.1504116039.git.alistair.francis@xilinx.com>","From":"Peter Maydell <peter.maydell@linaro.org>","Date":"Wed, 30 Aug 2017 23:12:04 +0100","Message-ID":"<CAFEAcA9N2dx6feVbw0BJ_xbs9czjJvmOCZfoOjf4ddpVk4ikbQ@mail.gmail.com>","To":"Alistair Francis <alistair.francis@xilinx.com>","Content-Type":"text/plain; charset=\"UTF-8\"","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::22d","Subject":"Re: [Qemu-devel] [PATCH v1 1/1] target/xtensa: Use the pre-defined\n\tMEMTXATTRS_UNSPECIFIED macro","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Max Filippov <jcmvbkbc@gmail.com>,\n\tQEMU Developers <qemu-devel@nongnu.org>, \n\tAlistair Francis <alistair23@gmail.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761206,"web_url":"http://patchwork.ozlabs.org/comment/1761206/","msgid":"<CAKmqyKN1YL_gi7+sQ2mzHKKB+ZDPZA6HER1ReAtVCynfxJZiAA@mail.gmail.com>","list_archive_url":null,"date":"2017-08-31T17:21:23","subject":"Re: [Qemu-devel] [PATCH v1 1/1] target/xtensa: Use the pre-defined\n\tMEMTXATTRS_UNSPECIFIED macro","submitter":{"id":47878,"url":"http://patchwork.ozlabs.org/api/people/47878/","name":"Alistair Francis","email":"alistair.francis@xilinx.com"},"content":"On Wed, Aug 30, 2017 at 3:12 PM, Peter Maydell <peter.maydell@linaro.org> wrote:\n> On 30 August 2017 at 19:02, Alistair Francis\n> <alistair.francis@xilinx.com> wrote:\n>> Instead of using the hardcoded (MemTxAttrs){0} for no memory attributes\n>> let's use the already defined MEMTXATTRS_UNSPECIFIED macro instead.\n>>\n>> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>\n>> ---\n>>\n>>  target/xtensa/op_helper.c | 4 ++--\n>>  1 file changed, 2 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c\n>> index 519fbeddd6..3d990c0caa 100644\n>> --- a/target/xtensa/op_helper.c\n>> +++ b/target/xtensa/op_helper.c\n>> @@ -1025,11 +1025,11 @@ void HELPER(ule_s)(CPUXtensaState *env, uint32_t br, float32 a, float32 b)\n>>  uint32_t HELPER(rer)(CPUXtensaState *env, uint32_t addr)\n>>  {\n>>      return address_space_ldl(env->address_space_er, addr,\n>> -                             (MemTxAttrs){0}, NULL);\n>> +                             MEMTXATTRS_UNSPECIFIED, NULL);\n>>  }\n>>\n>>  void HELPER(wer)(CPUXtensaState *env, uint32_t data, uint32_t addr)\n>>  {\n>>      address_space_stl(env->address_space_er, addr, data,\n>> -                      (MemTxAttrs){0}, NULL);\n>> +                      MEMTXATTRS_UNSPECIFIED, NULL);\n>>  }\n>\n> Might be worth noting in the commit that this is technically\n> a change of behaviour, because MEMTXATTRS_UNSPECIFIED\n> sets the 'unspecified' field to 1 whereas {0} doesn't.\n> I don't think anything actually checks that field, though.\n\nGood point, I have added something to the commit message to indicate\nthat. It'll be included in v2.\n\nThanks,\nAlistair\n\n>\n> thanks\n> -- PMM","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"iw52fzYC\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjq1q5wB1z9s7g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 03:22:22 +1000 (AEST)","from localhost ([::1]:56840 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnTAZ-00080J-Rw\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 13:22:19 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36347)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <alistair23@gmail.com>) id 1dnTAC-0007zz-Gz\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 13:21:57 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <alistair23@gmail.com>) id 1dnTAB-0008DL-Ei\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 13:21:56 -0400","from mail-io0-x243.google.com ([2607:f8b0:4001:c06::243]:33476)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <alistair23@gmail.com>)\n\tid 1dnTAB-0008Ck-9P\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 13:21:55 -0400","by mail-io0-x243.google.com with SMTP id f99so326198ioi.0\n\tfor <qemu-devel@nongnu.org>; Thu, 31 Aug 2017 10:21:55 -0700 (PDT)","by 10.79.24.66 with HTTP; Thu, 31 Aug 2017 10:21:23 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=LycEyy1QBVGu8Q7N8ppF6uIk9uQgTya0vrPt/HOz6h8=;\n\tb=iw52fzYCSAWzGZGcxkm02DTn/oRMId5Z633abqVeIVuibR0ll4QQTHaFLA72X5peFc\n\toLx/1qzccYSJ8YOtv4KmYRtdpBKCqr+LHevDVkWt08RPUkq28DTCurpzZHbN5lKY7kJc\n\te08t3LxaBfgfB4c54oN3NempXe6jE/4EcsfovY90h9RxuQMg8/iAydaCQ/oVISCLb/VM\n\tbE6hZQaxPU90NpIV8b2CRsSLZSuenQlUWZ9XWmwDR1iEWE7Zjil36atcwWV++jIK7tA8\n\t7fwtkNO2GHWN6otaRFAkGbFYkWtmYlqxFD+4TDR0ClwG5eqxSaEDk30K34B9XohvdOfo\n\t7y1Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:sender:in-reply-to:references:from\n\t:date:message-id:subject:to:cc;\n\tbh=LycEyy1QBVGu8Q7N8ppF6uIk9uQgTya0vrPt/HOz6h8=;\n\tb=RB1n+4Td+G5eZHusPhmCTua7ptssVWvipu9fOj5Ldz7/+Hxj/xQfVY9OvwW+d+C+hJ\n\t8AbDcTMckcjGO9sq3+fgGB/ho9X/L/A1m5JnxnD4RcEcoS41dmR30Z7zdpvF2Hw0LIRw\n\tGP1rrls8NasC/pUWSw7smDcdfBJRlpj0T02w1cuUN4kIVfYLPfQvcuGRJcFAV6m3UYVg\n\tPy9X8pO82aG7ybfsUmzjxhYSSoEacduz9PgqBr7O9kgEGdcIXSTZLscL1lw8f+FzUKit\n\t2SFR4SU9Xzk1vyDkOxY14ca2KDGnLakTJ3vtoFUH96ObVynHaSLs3rufoiOhr5Qi9L71\n\tn0pg==","X-Gm-Message-State":"AHYfb5hEeb4cBxbmBN5yCAJDtGW5dCkquPo5MVEddeMTMy44hSTeWTAo\n\tbUx3TNX3M8ue5+9i91MM7GLLvn+iSA==","X-Google-Smtp-Source":"ADKCNb4htfzCZV3DD6FwF4T6OiuqfVbIT65G16+tn3s7XT72EK1idKrPL4mqg+6ngkqk51dFzGHPAlUWssDhmDC6LUs=","X-Received":"by 10.36.202.197 with SMTP id k188mr1435638itg.94.1504200114525; \n\tThu, 31 Aug 2017 10:21:54 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<CAFEAcA9N2dx6feVbw0BJ_xbs9czjJvmOCZfoOjf4ddpVk4ikbQ@mail.gmail.com>","References":"<b35860a5f4377883fd2c2942bdb524d279a91de9.1504116039.git.alistair.francis@xilinx.com>\n\t<CAFEAcA9N2dx6feVbw0BJ_xbs9czjJvmOCZfoOjf4ddpVk4ikbQ@mail.gmail.com>","From":"Alistair Francis <alistair.francis@xilinx.com>","Date":"Thu, 31 Aug 2017 10:21:23 -0700","X-Google-Sender-Auth":"bbVk4LcR2QE6I2G7zNejcQwRLcQ","Message-ID":"<CAKmqyKN1YL_gi7+sQ2mzHKKB+ZDPZA6HER1ReAtVCynfxJZiAA@mail.gmail.com>","To":"Peter Maydell <peter.maydell@linaro.org>","Content-Type":"text/plain; charset=\"UTF-8\"","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:4001:c06::243","Subject":"Re: [Qemu-devel] [PATCH v1 1/1] target/xtensa: Use the pre-defined\n\tMEMTXATTRS_UNSPECIFIED macro","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Max Filippov <jcmvbkbc@gmail.com>,\n\tQEMU Developers <qemu-devel@nongnu.org>, \n\tAlistair Francis <alistair.francis@xilinx.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]