arch/parisc/lib/memcpy.c

Source file repositories/reference/linux-study-clean/arch/parisc/lib/memcpy.c

File Facts

System
Linux kernel
Corpus path
arch/parisc/lib/memcpy.c
Extension
.c
Size
2017 bytes
Lines
74
Domain
Architecture Layer
Bucket
arch/parisc
Inferred role
Architecture Layer: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

if (!prober_user(SR_TEMP1, start)) {
			newlen = (start - (unsigned long) src);
			break;
		}
		start += PAGE_SIZE;
		/* align to page boundry which may have different permission */
		start = PAGE_ALIGN_DOWN(start);
	}
	return len - newlen + pa_memcpy(dst, (void __force *)src, newlen);
}
EXPORT_SYMBOL(raw_copy_from_user);

void * memcpy(void * dst,const void *src, size_t count)
{
	mtsp(get_kernel_space(), SR_TEMP1);
	mtsp(get_kernel_space(), SR_TEMP2);
	pa_memcpy(dst, src, count);
	return dst;
}

EXPORT_SYMBOL(memcpy);

bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
{
	if ((unsigned long)unsafe_src < PAGE_SIZE)
		return false;
	/* check for I/O space F_EXTEND(0xfff00000) access as well? */
	return true;
}

Annotation

Implementation Notes