Sequencer.cc (9542:683991c46ac8) Sequencer.cc (9563:08d097040f90)
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

301 m_writeRequestTable.erase(line_addr);
302 } else {
303 m_readRequestTable.erase(line_addr);
304 }
305
306 markRemoved();
307}
308
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

301 m_writeRequestTable.erase(line_addr);
302 } else {
303 m_readRequestTable.erase(line_addr);
304 }
305
306 markRemoved();
307}
308
309void
310Sequencer::invalidateSC(const Address& address)
311{
312 RequestTable::iterator i = m_writeRequestTable.find(address);
313 if (i != m_writeRequestTable.end()) {
314 SequencerRequest* request = i->second;
315 // The controller has lost the coherence permissions, hence the lock
316 // on the cache line maintained by the cache should be cleared.
317 if (request->m_type == RubyRequestType_Store_Conditional) {
318 m_dataCache_ptr->clearLocked(address);
319 }
320 }
321}
322
309bool
310Sequencer::handleLlsc(const Address& address, SequencerRequest* request)
311{
312 //
313 // The success flag indicates whether the LLSC operation was successful.
314 // LL ops will always succeed, but SC may fail if the cache line is no
315 // longer locked.
316 //

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

387 (request->m_type == RubyRequestType_RMW_Read) ||
388 (request->m_type == RubyRequestType_RMW_Write) ||
389 (request->m_type == RubyRequestType_Load_Linked) ||
390 (request->m_type == RubyRequestType_Store_Conditional) ||
391 (request->m_type == RubyRequestType_Locked_RMW_Read) ||
392 (request->m_type == RubyRequestType_Locked_RMW_Write) ||
393 (request->m_type == RubyRequestType_FLUSH));
394
323bool
324Sequencer::handleLlsc(const Address& address, SequencerRequest* request)
325{
326 //
327 // The success flag indicates whether the LLSC operation was successful.
328 // LL ops will always succeed, but SC may fail if the cache line is no
329 // longer locked.
330 //

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

401 (request->m_type == RubyRequestType_RMW_Read) ||
402 (request->m_type == RubyRequestType_RMW_Write) ||
403 (request->m_type == RubyRequestType_Load_Linked) ||
404 (request->m_type == RubyRequestType_Store_Conditional) ||
405 (request->m_type == RubyRequestType_Locked_RMW_Read) ||
406 (request->m_type == RubyRequestType_Locked_RMW_Write) ||
407 (request->m_type == RubyRequestType_FLUSH));
408
395
396 //
397 // For Alpha, properly handle LL, SC, and write requests with respect to
398 // locked cache blocks.
399 //
400 // Not valid for Network_test protocl
401 //
402 bool success = true;
403 if(!m_usingNetworkTester)

--- 330 unchanged lines hidden ---
409 //
410 // For Alpha, properly handle LL, SC, and write requests with respect to
411 // locked cache blocks.
412 //
413 // Not valid for Network_test protocl
414 //
415 bool success = true;
416 if(!m_usingNetworkTester)

--- 330 unchanged lines hidden ---