locked_mem.hh (10030:b531e328342d) locked_mem.hh (10574:95297ec0f14b)
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 62 unchanged lines hidden (view full) ---

71 // If we see a snoop come into the CPU and we currently have an LLSC
72 // operation pending we need to clear the lock flag if it is to the same
73 // cache line.
74
75 if (!xc->readMiscReg(MISCREG_LOCKFLAG))
76 return;
77
78 Addr locked_addr = xc->readMiscReg(MISCREG_LOCKADDR) & cacheBlockMask;
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 62 unchanged lines hidden (view full) ---

71 // If we see a snoop come into the CPU and we currently have an LLSC
72 // operation pending we need to clear the lock flag if it is to the same
73 // cache line.
74
75 if (!xc->readMiscReg(MISCREG_LOCKFLAG))
76 return;
77
78 Addr locked_addr = xc->readMiscReg(MISCREG_LOCKADDR) & cacheBlockMask;
79 Addr snoop_addr = pkt->getAddr();
79 Addr snoop_addr = pkt->getAddr() & cacheBlockMask;
80
80
81 assert((cacheBlockMask & snoop_addr) == snoop_addr);
82
83 if (locked_addr == snoop_addr)
84 xc->setMiscReg(MISCREG_LOCKFLAG, false);
85}
86
87
88template <class XC>
89inline void
90handleLockedRead(XC *xc, Request *req)

--- 52 unchanged lines hidden ---
81 if (locked_addr == snoop_addr)
82 xc->setMiscReg(MISCREG_LOCKFLAG, false);
83}
84
85
86template <class XC>
87inline void
88handleLockedRead(XC *xc, Request *req)

--- 52 unchanged lines hidden ---