smem.c (7070874973eeccd867628a5c9eaefee3e832ccaa) | smem.c (e221a1da97d97a9b452f8be78bd14333bb5605aa) |
---|---|
1/* 2 * Copyright (c) 2015, Sony Mobile Communications AB. 3 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 and 7 * only version 2 as published by the Free Software Foundation. 8 * --- 266 unchanged lines hidden (view full) --- 275 struct smem_partition_header *partitions[SMEM_HOST_COUNT]; 276 size_t cacheline[SMEM_HOST_COUNT]; 277 u32 item_count; 278 279 unsigned num_regions; 280 struct smem_region regions[0]; 281}; 282 | 1/* 2 * Copyright (c) 2015, Sony Mobile Communications AB. 3 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 and 7 * only version 2 as published by the Free Software Foundation. 8 * --- 266 unchanged lines hidden (view full) --- 275 struct smem_partition_header *partitions[SMEM_HOST_COUNT]; 276 size_t cacheline[SMEM_HOST_COUNT]; 277 u32 item_count; 278 279 unsigned num_regions; 280 struct smem_region regions[0]; 281}; 282 |
283static struct smem_private_entry * | 283static void * |
284phdr_to_last_uncached_entry(struct smem_partition_header *phdr) 285{ 286 void *p = phdr; 287 288 return p + le32_to_cpu(phdr->offset_free_uncached); 289} 290 | 284phdr_to_last_uncached_entry(struct smem_partition_header *phdr) 285{ 286 void *p = phdr; 287 288 return p + le32_to_cpu(phdr->offset_free_uncached); 289} 290 |
291static void *phdr_to_first_cached_entry(struct smem_partition_header *phdr, | 291static struct smem_private_entry * 292phdr_to_first_cached_entry(struct smem_partition_header *phdr, |
292 size_t cacheline) 293{ 294 void *p = phdr; 295 struct smem_private_entry *e; 296 297 return p + le32_to_cpu(phdr->size) - ALIGN(sizeof(*e), cacheline); 298} 299 | 293 size_t cacheline) 294{ 295 void *p = phdr; 296 struct smem_private_entry *e; 297 298 return p + le32_to_cpu(phdr->size) - ALIGN(sizeof(*e), cacheline); 299} 300 |
300static void *phdr_to_last_cached_entry(struct smem_partition_header *phdr) | 301static void * 302phdr_to_last_cached_entry(struct smem_partition_header *phdr) |
301{ 302 void *p = phdr; 303 304 return p + le32_to_cpu(phdr->offset_free_cached); 305} 306 307static struct smem_private_entry * 308phdr_to_first_uncached_entry(struct smem_partition_header *phdr) --- 683 unchanged lines hidden --- | 303{ 304 void *p = phdr; 305 306 return p + le32_to_cpu(phdr->offset_free_cached); 307} 308 309static struct smem_private_entry * 310phdr_to_first_uncached_entry(struct smem_partition_header *phdr) --- 683 unchanged lines hidden --- |