xref: /haiku/src/system/kernel/vm/VMDeviceCache.cpp (revision 2a79a7686f90e5720024387dd90f8e058d13b044)
15c99d639SIngo Weinhold /*
25c99d639SIngo Weinhold  * Copyright 2004-2007, Axel Dörfler, axeld@pinc-software.de.
35c99d639SIngo Weinhold  * Distributed under the terms of the MIT License.
45c99d639SIngo Weinhold  *
55c99d639SIngo Weinhold  * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
65c99d639SIngo Weinhold  * Distributed under the terms of the NewOS License.
75c99d639SIngo Weinhold  */
85c99d639SIngo Weinhold 
95c99d639SIngo Weinhold #include "VMDeviceCache.h"
105c99d639SIngo Weinhold 
115c99d639SIngo Weinhold 
125c99d639SIngo Weinhold status_t
135c99d639SIngo Weinhold VMDeviceCache::Init(addr_t baseAddress)
145c99d639SIngo Weinhold {
155c99d639SIngo Weinhold 	fBaseAddress = baseAddress;
165c99d639SIngo Weinhold 	return VMCache::Init(CACHE_TYPE_DEVICE);
175c99d639SIngo Weinhold }
185c99d639SIngo Weinhold 
195c99d639SIngo Weinhold 
205c99d639SIngo Weinhold bool
215c99d639SIngo Weinhold VMDeviceCache::HasPage(off_t offset)
225c99d639SIngo Weinhold {
235c99d639SIngo Weinhold 	// this should never be called
245c99d639SIngo Weinhold 	return false;
255c99d639SIngo Weinhold }
265c99d639SIngo Weinhold 
275c99d639SIngo Weinhold 
285c99d639SIngo Weinhold status_t
295c99d639SIngo Weinhold VMDeviceCache::Read(off_t offset, const iovec *vecs, size_t count,
30e6bd90c5SIngo Weinhold 	size_t *_numBytes)
315c99d639SIngo Weinhold {
325c99d639SIngo Weinhold 	panic("device_store: read called. Invalid!\n");
335c99d639SIngo Weinhold 	return B_ERROR;
345c99d639SIngo Weinhold }
355c99d639SIngo Weinhold 
365c99d639SIngo Weinhold 
375c99d639SIngo Weinhold status_t
385c99d639SIngo Weinhold VMDeviceCache::Write(off_t offset, const iovec *vecs, size_t count,
39*2a79a768SIngo Weinhold 	uint32 flags, size_t *_numBytes)
405c99d639SIngo Weinhold {
415c99d639SIngo Weinhold 	// no place to write, this will cause the page daemon to skip this store
425c99d639SIngo Weinhold 	return B_OK;
435c99d639SIngo Weinhold }
44