Skip to content

Add locks to R-Car PFC driver #60445

@xakep-amatop

Description

@xakep-amatop

To prevent the R-Car PFC driver from functioning incorrectly, it is necessary to add locks. For instance, if a thread happens to call the pfc_rcar_write function and then goes to sleep between two writes, the value in PMMR can be overwritten by another thread:

	sys_write32(~val, PFC_REG_BASE + PFC_RCAR_PMMR);
	sys_write32(val, PFC_REG_BASE + offs);

To address this issue and similar situations within the driver, proper protection should be implemented.

Furthermore, there can be an issue when attempting to modify the PFC state on multi-core systems.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions