Lines Matching refs:start
35 atomic_t start; member
49 return atomic_read(&prz->buffer->start); in buffer_start()
62 old = atomic_read(&prz->buffer->start); in buffer_start_add()
66 atomic_set(&prz->buffer->start, new); in buffer_start_add()
123 unsigned int start, unsigned int count) in persistent_ram_update_ecc() argument
136 block = buffer->data + (start & ~(ecc_block_size - 1)); in persistent_ram_update_ecc()
137 par = prz->par_buffer + (start / ecc_block_size) * ecc_size; in persistent_ram_update_ecc()
145 } while (block < buffer->data + start + count); in persistent_ram_update_ecc()
275 const void *s, unsigned int start, unsigned int count) in persistent_ram_update() argument
278 memcpy_toio(buffer->data + start, s, count); in persistent_ram_update()
279 persistent_ram_update_ecc(prz, start, count); in persistent_ram_update()
283 const void __user *s, unsigned int start, unsigned int count) in persistent_ram_update_user() argument
286 int ret = unlikely(copy_from_user(buffer->data + start, s, count)) ? in persistent_ram_update_user()
288 persistent_ram_update_ecc(prz, start, count); in persistent_ram_update_user()
296 size_t start = buffer_start(prz); in persistent_ram_save_old() local
311 memcpy_fromio(prz->old_log, &buffer->data[start], size - start); in persistent_ram_save_old()
312 memcpy_fromio(prz->old_log + size - start, &buffer->data[0], start); in persistent_ram_save_old()
320 size_t start; in persistent_ram_write() local
329 start = buffer_start_add(prz, c); in persistent_ram_write()
331 rem = prz->buffer_size - start; in persistent_ram_write()
333 persistent_ram_update(prz, s, start, rem); in persistent_ram_write()
336 start = 0; in persistent_ram_write()
338 persistent_ram_update(prz, s, start, c); in persistent_ram_write()
349 size_t start; in persistent_ram_write_user() local
358 start = buffer_start_add(prz, c); in persistent_ram_write_user()
360 rem = prz->buffer_size - start; in persistent_ram_write_user()
362 ret = persistent_ram_update_user(prz, s, start, rem); in persistent_ram_write_user()
365 start = 0; in persistent_ram_write_user()
368 ret = persistent_ram_update_user(prz, s, start, c); in persistent_ram_write_user()
394 atomic_set(&prz->buffer->start, 0); in persistent_ram_zap()
403 static void *persistent_ram_vmap(phys_addr_t start, size_t size, in persistent_ram_vmap() argument
413 page_start = start - offset_in_page(start); in persistent_ram_vmap()
414 page_count = DIV_ROUND_UP(size + offset_in_page(start), PAGE_SIZE); in persistent_ram_vmap()
454 return vaddr + offset_in_page(start); in persistent_ram_vmap()
457 static void *persistent_ram_iomap(phys_addr_t start, size_t size, in persistent_ram_iomap() argument
462 if (!request_mem_region(start, size, label ?: "ramoops")) { in persistent_ram_iomap()
465 (unsigned long long)size, (unsigned long long)start); in persistent_ram_iomap()
470 va = ioremap(start, size); in persistent_ram_iomap()
472 va = ioremap_wc(start, size); in persistent_ram_iomap()
482 static int persistent_ram_buffer_map(phys_addr_t start, phys_addr_t size, in persistent_ram_buffer_map() argument
485 prz->paddr = start; in persistent_ram_buffer_map()
488 if (pfn_valid(start >> PAGE_SHIFT)) in persistent_ram_buffer_map()
489 prz->vaddr = persistent_ram_vmap(start, size, memtype); in persistent_ram_buffer_map()
491 prz->vaddr = persistent_ram_iomap(start, size, memtype, in persistent_ram_buffer_map()
496 (unsigned long long)size, (unsigned long long)start); in persistent_ram_buffer_map()
577 struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size, in persistent_ram_new() argument
597 ret = persistent_ram_buffer_map(start, size, prz, memtype); in persistent_ram_new()