From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkTml-0004Ge-NH for qemu-devel@nongnu.org; Tue, 21 Apr 2015 04:44:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkTmh-0002pw-Dd for qemu-devel@nongnu.org; Tue, 21 Apr 2015 04:44:03 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:45652 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkTmh-0002pb-7n for qemu-devel@nongnu.org; Tue, 21 Apr 2015 04:43:59 -0400 References: <1428931324-4973-1-git-send-email-peter.maydell@linaro.org> <1428931324-4973-10-git-send-email-peter.maydell@linaro.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <1428931324-4973-10-git-send-email-peter.maydell@linaro.org> Date: Tue, 21 Apr 2015 09:44:21 +0100 Message-ID: <878udlx44a.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2 09/14] Switch non-CPU callers from ld/st*_phys to address_space_ld/st* List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Peter Crosthwaite , patches@linaro.org, "Edgar E. Iglesias" , qemu-devel@nongnu.org, Greg Bellows , Paolo Bonzini , Richard Henderson Peter Maydell writes: > Switch all the uses of ld/st*_phys to address_space_ld/st*, > except for those cases where the address space is the CPU's > (ie cs->as). This was done with the following script which > generates a Coccinelle patch. > > A few over-80-columns lines in the result were rewrapped by > hand where Coccinelle failed to do the wrapping automatically, > as well as one location where it didn't put a line-continuation > '\' when wrapping lines on a change made to a match inside > a macro definition. > > ===begin=== > #!/bin/sh -e > # Usage: > # ./ldst-phys.spatch.sh > ldst-phys.spatch > # spatch -sp_file ldst-phys.spatch -dir . | sed -e '/^+/s/\t/ /g' > out.patch > # patch -p1 < out.patch > > for FN in ub uw_le uw_be l_le l_be q_le q_be uw l q; do > cat < @ cpu_matches_ld_${FN} @ > expression E1,E2; > identifier as; > @@ > > ld${FN}_phys(E1->as,E2) > > @ other_matches_ld_${FN} depends on !cpu_matches_ld_${FN} @ > expression E1,E2; > @@ > > -ld${FN}_phys(E1,E2) > +address_space_ld${FN}(E1,E2, MEMTXATTRS_UNSPECIFIED, NULL) > > EOF > > done > > for FN in b w_le w_be l_le l_be q_le q_be w l q; do > cat < @ cpu_matches_st_${FN} @ > expression E1,E2,E3; > identifier as; > @@ > > st${FN}_phys(E1->as,E2,E3) > > @ other_matches_st_${FN} depends on !cpu_matches_st_${FN} @ > expression E1,E2,E3; > @@ > > -st${FN}_phys(E1,E2,E3) > +address_space_st${FN}(E1,E2,E3, MEMTXATTRS_UNSPECIFIED, NULL) > > EOF > > done > ===endit=== > > Signed-off-by: Peter Maydell > Reviewed-by: Edgar E. Iglesias Reviewed-by: Alex Bennée -- Alex Bennée