select CP_SECURE_BOOT
select LINK_DEVICE_NAPI
select MODEM_IF_NET_GRO
+ select CACHED_RAW_RX_BUFFER
default n
menu "Configurations"
---help---
This enables GRO(Generic Receive Offload) feature
+config CACHED_RAW_RX_BUFFER
+ bool "Set cached RX RAW BUFFER for high data performance"
+ default n
+
config UART_SWITCH
bool "UART SWITCH Support"
default n
return -EFAULT;
}
- ret = copy_to_user((void __user *)arg, &dump_size, sizeof(dump_size));
- if (ret) {
- mif_err("ERR! copy_from_user fail!\n");
- return -EFAULT;
- }
-
while (copied < dump_size) {
if (dump_size - copied < alloc_size)
alloc_size = dump_size - copied;
{
struct shmem_link_device *shmd = to_shmem_link_device(ld);
size_t vss_size = shm_get_vss_size();
+ int ret = 0;
if (vss_size == 0 || shmd->vss_base == NULL) {
mif_err("ERR! save_vss_dump fail!\n");
return -EFAULT;
}
+ ret = copy_to_user((void __user *)arg, &vss_size, sizeof(vss_size));
+ if (ret) {
+ mif_err("ERR! copy_from_user fail!\n");
+ return -EFAULT;
+ }
+
return save_dump_file(ld, iod, arg, shmd->vss_base, vss_size);
}
{
struct shmem_link_device *shmd = to_shmem_link_device(ld);
size_t acpm_size = shm_get_acpm_size();
+ int ret = 0;
if (acpm_size == 0 || shmd->acpm_base == NULL) {
mif_err("ERR! save_acpm_dump fail!\n");
return -EFAULT;
}
+ ret = copy_to_user((void __user *)arg, &acpm_size, sizeof(acpm_size));
+ if (ret) {
+ mif_err("ERR! copy_from_user fail!\n");
+ return -EFAULT;
+ }
+
return save_dump_file(ld, iod, arg, shmd->acpm_base, acpm_size);
}
{
struct shmem_link_device *shmd = to_shmem_link_device(ld);
size_t shmem_size = shmd->size;
+ int ret = 0;
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+ u8 *rxq_buff;
+ int rxq_buff_size;
+
+ rxq_buff = get_rxq_buff(shmd, IPC_RAW);
+ rxq_buff_size = get_rxq_buff_size(shmd, IPC_RAW);
+#endif
if (shmem_size == 0 || shmd->base == NULL) {
mif_err("ERR! save_shmem_dump fail!\n");
return -EFAULT;
}
- return save_dump_file(ld, iod, arg, (u8 __iomem *)shmd->base, shmem_size);
+ ret = copy_to_user((void __user *)arg, &shmem_size, sizeof(shmem_size));
+ if (ret) {
+ mif_err("ERR! copy_from_user fail!\n");
+ return -EFAULT;
+ }
+
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+ ret = save_dump_file(ld, iod, arg, (u8 __iomem *)shmd->base, shmem_size - rxq_buff_size);
+ __inval_dcache_area((void *)rxq_buff, rxq_buff_size);
+ ret = save_dump_file(ld, iod, arg, (u8 __iomem *)rxq_buff, rxq_buff_size);
+#else
+ ret = save_dump_file(ld, iod, arg, (u8 __iomem *)shmd->base, shmem_size);
+#endif
+ return ret;
}
int out; /* index to the start of current frame */
int tot; /* total length including padding data */
int rcvd_pkt; /* number of received packets */
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+ int len;
+#endif
src = circ->buff;
qsize = circ->qsize;
tot = 0;
rcvd_pkt = 0;
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+ if ((out + rcvd) <= qsize) {
+ __inval_dcache_area((void *)(src + out), rcvd);
+ } else {
+ len = qsize - out;
+
+ __inval_dcache_area((void *)(src + out), len);
+ __inval_dcache_area((void *)src, rcvd - len);
+ }
+#endif
+
while (rest > 0) {
u8 ch;
int rest; /* size of the rest data */
int out; /* index to the start of current frame */
int tot; /* total length including padding data */
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+ int len;
+#endif
src = circ->buff;
qsize = circ->qsize;
rest = circ->size;
tot = 0;
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+ if ((out + rcvd) <= qsize) {
+ __inval_dcache_area((void *)(src + out), rcvd);
+ } else {
+ len = qsize - out;
+
+ __inval_dcache_area((void *)(src + out), len);
+ __inval_dcache_area((void *)src, rcvd - len);
+ }
+#endif
+
while (rest > 0) {
u8 ch;
u32 rest; /* size of the rest data */
u32 out; /* index to the start of current frame */
unsigned int tot; /* total length including padding data */
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+ int len;
+#endif
src = circ->buff;
qsize = circ->qsize;
rcvd = circ->size;
rest = circ->size;
tot = 0;
+
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+ if ((out + rcvd) <= qsize) {
+ __inval_dcache_area((void *)(src + out), rcvd);
+ } else {
+ len = qsize - out;
+
+ __inval_dcache_area((void *)(src + out), len);
+ __inval_dcache_area((void *)src, rcvd - len);
+ }
+#endif
+
while (rest > 0) {
u8 ch;
dev->rxq.head = (u32 __iomem *)&map->raw_rx_head;
dev->rxq.tail = (u32 __iomem *)&map->raw_rx_tail;
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+ dev->rxq.buff = (u8 __iomem *)phys_to_virt(shmd->start + SZ_2M);
+#else
dev->rxq.buff = (u8 __iomem *)&map->raw_rx_buff[0];
+#endif
dev->rxq.size = SHM_4M_RAW_RX_BUFF_SZ;
dev->mask_req_ack = INT_MASK_REQ_ACK_R;
else
return -EINVAL;
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+ memset(shmd->base, 0, shmd->size - SHM_4M_RAW_RX_BUFF_SZ);
+#else
memset(shmd->base, 0, shmd->size);
-
+#endif
shmd->magic = shmd->ipc_map.magic;
shmd->access = shmd->ipc_map.access;
shmd->start = modem->shmem_base + modem->ipcmem_offset;
shmd->size = modem->ipc_size;
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+ shmd->base = shm_request_region(shmd->start, shmd->size - SHM_4M_RAW_RX_BUFF_SZ);
+#else
shmd->base = shm_request_region(shmd->start, shmd->size);
+#endif
if (!shmd->base) {
mif_err("%s: ERR! shm_request_region fail\n", ld->name);
goto error;
#ifndef __MODEM_LINK_DEVICE_SHMEM_H__
#define __MODEM_LINK_DEVICE_SHMEM_H__
+#ifdef CONFIG_CACHED_RAW_RX_BUFFER
+#include <asm/cacheflush.h>
+#endif
+
#include "modem_utils.h"
#include "modem_link_device_memory.h"