From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Olivier DANET <odanet@caramail.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [ 02/79] sparc32: vm_area_struct access for old Sun SPARCs.
Date: Fri, 26 Jul 2013 13:46:52 -0700 [thread overview]
Message-ID: <20130726204722.156069119@linuxfoundation.org> (raw)
In-Reply-To: <20130726204721.849052763@linuxfoundation.org>
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Olivier DANET <odanet@caramail.com>
Commit e4c6bfd2d79d063017ab19a18915f0bc759f32d9 ("mm: rearrange
vm_area_struct for fewer cache misses") changed the layout of the
vm_area_struct structure, it broke several SPARC32 assembly routines
which used numerical constants for accessing the vm_mm field.
This patch defines the VMA_VM_MM constant to replace the immediate values.
Signed-off-by: Olivier DANET <odanet@caramail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/sparc/kernel/asm-offsets.c | 2 ++
arch/sparc/mm/hypersparc.S | 8 ++++----
arch/sparc/mm/swift.S | 8 ++++----
arch/sparc/mm/tsunami.S | 6 +++---
arch/sparc/mm/viking.S | 10 +++++-----
5 files changed, 18 insertions(+), 16 deletions(-)
--- a/arch/sparc/kernel/asm-offsets.c
+++ b/arch/sparc/kernel/asm-offsets.c
@@ -49,6 +49,8 @@ int foo(void)
DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread));
BLANK();
DEFINE(AOFF_mm_context, offsetof(struct mm_struct, context));
+ BLANK();
+ DEFINE(VMA_VM_MM, offsetof(struct vm_area_struct, vm_mm));
/* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */
return 0;
--- a/arch/sparc/mm/hypersparc.S
+++ b/arch/sparc/mm/hypersparc.S
@@ -74,7 +74,7 @@ hypersparc_flush_cache_mm_out:
/* The things we do for performance... */
hypersparc_flush_cache_range:
- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
#ifndef CONFIG_SMP
ld [%o0 + AOFF_mm_context], %g1
cmp %g1, -1
@@ -163,7 +163,7 @@ hypersparc_flush_cache_range_out:
*/
/* Verified, my ass... */
hypersparc_flush_cache_page:
- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + AOFF_mm_context], %g2
#ifndef CONFIG_SMP
cmp %g2, -1
@@ -284,7 +284,7 @@ hypersparc_flush_tlb_mm_out:
sta %g5, [%g1] ASI_M_MMUREGS
hypersparc_flush_tlb_range:
- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
@@ -307,7 +307,7 @@ hypersparc_flush_tlb_range_out:
sta %g5, [%g1] ASI_M_MMUREGS
hypersparc_flush_tlb_page:
- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
andn %o1, (PAGE_SIZE - 1), %o1
--- a/arch/sparc/mm/swift.S
+++ b/arch/sparc/mm/swift.S
@@ -105,7 +105,7 @@ swift_flush_cache_mm_out:
.globl swift_flush_cache_range
swift_flush_cache_range:
- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
sub %o2, %o1, %o2
sethi %hi(4096), %o3
cmp %o2, %o3
@@ -116,7 +116,7 @@ swift_flush_cache_range:
.globl swift_flush_cache_page
swift_flush_cache_page:
- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
70:
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
@@ -219,7 +219,7 @@ swift_flush_sig_insns:
.globl swift_flush_tlb_range
.globl swift_flush_tlb_all
swift_flush_tlb_range:
- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
swift_flush_tlb_mm:
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
@@ -233,7 +233,7 @@ swift_flush_tlb_all_out:
.globl swift_flush_tlb_page
swift_flush_tlb_page:
- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
andn %o1, (PAGE_SIZE - 1), %o1
--- a/arch/sparc/mm/tsunami.S
+++ b/arch/sparc/mm/tsunami.S
@@ -24,7 +24,7 @@
/* Sliiick... */
tsunami_flush_cache_page:
tsunami_flush_cache_range:
- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
tsunami_flush_cache_mm:
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
@@ -46,7 +46,7 @@ tsunami_flush_sig_insns:
/* More slick stuff... */
tsunami_flush_tlb_range:
- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
tsunami_flush_tlb_mm:
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
@@ -65,7 +65,7 @@ tsunami_flush_tlb_out:
/* This one can be done in a fine grained manner... */
tsunami_flush_tlb_page:
- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
andn %o1, (PAGE_SIZE - 1), %o1
--- a/arch/sparc/mm/viking.S
+++ b/arch/sparc/mm/viking.S
@@ -108,7 +108,7 @@ viking_mxcc_flush_page:
viking_flush_cache_page:
viking_flush_cache_range:
#ifndef CONFIG_SMP
- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
#endif
viking_flush_cache_mm:
#ifndef CONFIG_SMP
@@ -148,7 +148,7 @@ viking_flush_tlb_mm:
#endif
viking_flush_tlb_range:
- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
@@ -173,7 +173,7 @@ viking_flush_tlb_range:
#endif
viking_flush_tlb_page:
- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
@@ -239,7 +239,7 @@ sun4dsmp_flush_tlb_range:
tst %g5
bne 3f
mov SRMMU_CTX_REG, %g1
- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
sethi %hi(~((1 << SRMMU_PGDIR_SHIFT) - 1)), %o4
@@ -265,7 +265,7 @@ sun4dsmp_flush_tlb_page:
tst %g5
bne 2f
mov SRMMU_CTX_REG, %g1
- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
+ ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
and %o1, PAGE_MASK, %o1
next prev parent reply other threads:[~2013-07-26 21:45 UTC|newest]
Thread overview: 98+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-26 20:46 [ 00/79] 3.10.4-stable review Greg Kroah-Hartman
2013-07-26 20:46 ` [ 01/79] writeback: Fix periodic writeback after fs mount Greg Kroah-Hartman
2013-07-26 20:46 ` Greg Kroah-Hartman [this message]
2013-07-27 15:39 ` [ 02/79] sparc32: vm_area_struct access for old Sun SPARCs Ben Hutchings
2013-07-26 20:46 ` [ 03/79] ipv6: only apply anti-spoofing checks to not-pointopoint tunnels Greg Kroah-Hartman
2013-07-26 20:46 ` [ 04/79] neighbour: fix a race in neigh_destroy() Greg Kroah-Hartman
2013-07-26 20:46 ` [ 05/79] x25: Fix broken locking in ioctl error paths Greg Kroah-Hartman
2013-07-26 20:46 ` [ 06/79] net: Swap ver and type in pppoe_hdr Greg Kroah-Hartman
2013-07-27 15:58 ` Ben Hutchings
2013-07-28 0:55 ` David Miller
2013-07-28 3:14 ` Ben Hutchings
2013-07-28 4:16 ` Greg KH
2013-07-28 4:39 ` David Miller
2013-07-28 18:29 ` Greg KH
2013-07-26 20:46 ` [ 07/79] gre: fix a regression in ioctl Greg Kroah-Hartman
2013-07-26 20:46 ` [ 08/79] vti: remove duplicated code to fix a memory leak Greg Kroah-Hartman
2013-07-26 20:46 ` [ 09/79] ipv6,mcast: always hold idev->lock before mca_lock Greg Kroah-Hartman
2013-07-26 20:47 ` [ 10/79] ip_tunnels: Use skb-len to PMTU check Greg Kroah-Hartman
2013-07-26 20:47 ` [ 11/79] l2tp: add missing .owner to struct pppox_proto Greg Kroah-Hartman
2013-07-26 20:47 ` [ 12/79] ipip: fix a regression in ioctl Greg Kroah-Hartman
2013-07-26 20:47 ` [ 13/79] ipv6: call udp_push_pending_frames when uncorking a socket with AF_INET pending data Greg Kroah-Hartman
2013-07-26 20:47 ` [ 14/79] ipv6: ip6_append_data_mtu did not care about pmtudisc and frag_size Greg Kroah-Hartman
2013-07-26 20:47 ` [ 15/79] ipv6: rt6_check_neigh should successfully verify neigh if no NUD information are available Greg Kroah-Hartman
2013-07-26 20:47 ` [ 16/79] sfc: Fix memory leak when discarding scattered packets Greg Kroah-Hartman
2013-07-26 20:47 ` [ 17/79] net/cadence/macb: fix bug/typo in extracting gem_irq_read_clear bit Greg Kroah-Hartman
2013-07-26 20:47 ` [ 18/79] virtio: support unlocked queue poll Greg Kroah-Hartman
2013-07-26 20:47 ` [ 19/79] virtio_net: fix race in RX VQ processing Greg Kroah-Hartman
2013-07-26 20:47 ` [ 20/79] vhost-net: fix use-after-free in vhost_net_flush Greg Kroah-Hartman
2013-07-26 20:47 ` [ 21/79] sunvnet: vnet_port_remove must call unregister_netdev Greg Kroah-Hartman
2013-07-26 20:47 ` [ 22/79] ifb: fix rcu_sched self-detected stalls Greg Kroah-Hartman
2013-07-26 20:47 ` [ 23/79] tuntap: correctly linearize skb when zerocopy is used Greg Kroah-Hartman
2013-07-26 20:47 ` [ 24/79] macvtap: " Greg Kroah-Hartman
2013-07-26 20:47 ` [ 25/79] ipv6: in case of link failure remove route directly instead of letting it expire Greg Kroah-Hartman
2013-07-26 20:47 ` [ 26/79] 9p: fix off by one causing access violations and memory corruption Greg Kroah-Hartman
2013-07-26 20:47 ` [ 27/79] alx: fix lockdep annotation Greg Kroah-Hartman
2013-07-26 20:47 ` [ 28/79] ipv6: fix route selection if kernel is not compiled with CONFIG_IPV6_ROUTER_PREF Greg Kroah-Hartman
2013-07-26 20:47 ` [ 29/79] dummy: fix oops when loading the dummy failed Greg Kroah-Hartman
2013-07-26 20:47 ` [ 30/79] ifb: fix oops when loading the ifb failed Greg Kroah-Hartman
2013-07-26 20:47 ` [ 31/79] gre: Fix MTU sizing check for gretap tunnels Greg Kroah-Hartman
2013-07-26 20:47 ` [ 32/79] ipv6: only static routes qualify for equal cost multipathing Greg Kroah-Hartman
2013-07-26 20:47 ` [ 33/79] atl1e: fix dma mapping warnings Greg Kroah-Hartman
2013-07-26 20:47 ` [ 34/79] atl1e: unmap partially mapped skb on dma error and free skb Greg Kroah-Hartman
2013-07-26 20:47 ` [ 35/79] ipv4: set transport header earlier Greg Kroah-Hartman
2013-07-26 20:47 ` [ 36/79] be2net: Fix to avoid hardware workaround when not needed Greg Kroah-Hartman
2013-07-26 20:47 ` [ 37/79] hyperv: Fix the NETIF_F_SG flag setting in netvsc Greg Kroah-Hartman
2013-07-26 20:47 ` [ 38/79] pkt_sched: sch_qfq: remove a source of high packet delay/jitter Greg Kroah-Hartman
2013-07-26 20:47 ` [ 39/79] tuntap: do not zerocopy if iov needs more pages than MAX_SKB_FRAGS Greg Kroah-Hartman
2013-07-26 20:47 ` [ 40/79] macvtap: " Greg Kroah-Hartman
2013-07-26 20:47 ` [ 41/79] vlan: mask vlan prio bits Greg Kroah-Hartman
2013-07-26 20:47 ` [ 42/79] vlan: fix a race in egress prio management Greg Kroah-Hartman
2013-07-27 16:55 ` Ben Hutchings
2013-07-27 17:38 ` Eric Dumazet
2013-07-27 17:58 ` Ben Hutchings
2013-07-26 20:47 ` [ 43/79] MIPS: Oceton: Fix build error Greg Kroah-Hartman
2013-07-26 20:47 ` [ 44/79] RAPIDIO: IDT_GEN2: " Greg Kroah-Hartman
2013-07-26 20:47 ` [ 45/79] fuse: readdirplus: fix dentry leak Greg Kroah-Hartman
2013-07-26 20:47 ` [ 46/79] fuse: readdirplus: fix instantiate Greg Kroah-Hartman
2013-07-26 20:47 ` [ 47/79] fuse: readdirplus: sanity checks Greg Kroah-Hartman
2013-07-26 20:47 ` [ 48/79] bcache: Fix a dumb race Greg Kroah-Hartman
2013-07-26 20:47 ` [ 49/79] bcache: Advertise that flushes are supported Greg Kroah-Hartman
2013-07-26 20:47 ` [ 50/79] bcache: Shutdown fix Greg Kroah-Hartman
2013-07-26 20:47 ` [ 51/79] bcache: Fix a sysfs splat on shutdown Greg Kroah-Hartman
2013-07-26 20:47 ` [ 52/79] bcache: Fix GC_SECTORS_USED() calculation Greg Kroah-Hartman
2013-07-26 20:47 ` [ 53/79] bcache: Journal replay fix Greg Kroah-Hartman
2013-07-26 20:47 ` [ 54/79] EDAC: Fix lockdep splat Greg Kroah-Hartman
2013-07-26 20:47 ` [ 55/79] SCSI: mpt3sas: Infinite loops can occur if MPI2_IOCSTATUS_CONFIG_INVALID_PAGE is not returned Greg Kroah-Hartman
2013-07-26 20:47 ` [ 56/79] SCSI: mpt3sas: fix for kernel panic when driver loads with HBA conected to non LUN 0 configured expander Greg Kroah-Hartman
2013-07-26 20:47 ` [ 57/79] SCSI: megaraid_sas: fix memory leak if SGL has zero length entries Greg Kroah-Hartman
2013-07-26 20:47 ` [ 58/79] lib/Kconfig.debug: Restrict FRAME_POINTER for MIPS Greg Kroah-Hartman
2013-07-26 20:47 ` [ 59/79] usb: serial: option: blacklist ONDA MT689DC QMI interface Greg Kroah-Hartman
2013-07-26 20:47 ` [ 60/79] usb: option: add TP-LINK MA260 Greg Kroah-Hartman
2013-07-26 20:47 ` [ 61/79] usb: serial: option: add Olivetti Olicard 200 Greg Kroah-Hartman
2013-07-26 20:47 ` [ 62/79] usb: serial: option.c: remove ONDA MT825UP product ID fromdriver Greg Kroah-Hartman
2013-07-26 20:47 ` [ 63/79] USB: option: append Petatel NP10T device to GSM modems list Greg Kroah-Hartman
2013-07-26 20:47 ` [ 64/79] USB: option: add D-Link DWM-152/C1 and DWM-156/C1 Greg Kroah-Hartman
2013-07-26 20:47 ` [ 65/79] usb: serial: option: Add ONYX 3G device support Greg Kroah-Hartman
2013-07-26 20:47 ` [ 66/79] ARM: S3C24XX: Add missing clkdev entries for s3c2440 UART Greg Kroah-Hartman
2013-07-26 20:47 ` [ 67/79] ARM: footbridge: fix overlapping PCI mappings Greg Kroah-Hartman
2013-07-26 20:47 ` [ 68/79] usb: serial: cp210x: Add USB ID for Netgear Switches embedded serial adapter Greg Kroah-Hartman
2013-07-26 20:47 ` [ 69/79] USB: cp210x: add MMB and PI ZigBee USB Device Support Greg Kroah-Hartman
2013-07-26 20:48 ` [ 70/79] usb: cp210x support SEL C662 Vendor/Device Greg Kroah-Hartman
2013-07-26 20:48 ` [ 71/79] ext4: fix error handling in ext4_ext_truncate() Greg Kroah-Hartman
2013-07-27 21:33 ` Ben Hutchings
2013-07-28 11:40 ` Theodore Ts'o
2013-07-28 18:27 ` Greg Kroah-Hartman
2013-07-28 21:15 ` Ben Hutchings
2013-07-26 20:48 ` [ 72/79] PM / Sleep: avoid autosleep in shutdown progress Greg Kroah-Hartman
2013-07-26 20:48 ` [ 73/79] media: saa7134: Fix unlocked snd_pcm_stop() call Greg Kroah-Hartman
2013-07-26 20:48 ` [ 74/79] media: dmxdev: remove dvb_ringbuffer_flush() on writer side Greg Kroah-Hartman
2013-07-26 20:48 ` [ 75/79] lockd: protect nlm_blocked access in nlmsvc_retry_blocked Greg Kroah-Hartman
2013-07-26 20:48 ` [ 76/79] hrtimers: Move SMP function call to thread context Greg Kroah-Hartman
2013-07-26 20:48 ` [ 77/79] ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n Laptop Greg Kroah-Hartman
2013-07-26 20:48 ` [ 78/79] ALSA: usb-audio: 6fire: return correct XRUN indication Greg Kroah-Hartman
2013-07-26 20:48 ` [ 79/79] ALSA: hda - Fix EAPD GPIO control for Sigmatel codecs Greg Kroah-Hartman
2013-07-27 0:19 ` [ 00/79] 3.10.4-stable review Shuah Khan
2013-07-27 0:57 ` Greg Kroah-Hartman
2013-07-28 0:48 ` linux
2013-07-28 18:26 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130726204722.156069119@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=odanet@caramail.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox