mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
arm_mpam: Move MPAMF_ECR write helpers to allow reuse
In preparation for calling mpam_enable_msc_ecr() from the CPU hotplug handlers move it higher in the file. Move mpam_disable_msc_ecr() too to keep them together. Signed-off-by: Ben Horgan <ben.horgan@arm.com> Tested-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
This commit is contained in:
parent
eb0fde98fe
commit
63b3495c3d
|
|
@ -1817,6 +1817,25 @@ static void mpam_reprogram_msc(struct mpam_msc *msc)
|
|||
mutex_unlock(&msc->cfg_lock);
|
||||
}
|
||||
|
||||
static int mpam_enable_msc_ecr(void *_msc)
|
||||
{
|
||||
struct mpam_msc *msc = _msc;
|
||||
|
||||
__mpam_write_reg(msc, MPAMF_ECR, MPAMF_ECR_INTEN);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This can run in mpam_disable(), and the interrupt handler on the same CPU */
|
||||
static int mpam_disable_msc_ecr(void *_msc)
|
||||
{
|
||||
struct mpam_msc *msc = _msc;
|
||||
|
||||
__mpam_write_reg(msc, MPAMF_ECR, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void _enable_percpu_irq(void *_irq)
|
||||
{
|
||||
int *irq = _irq;
|
||||
|
|
@ -2443,25 +2462,6 @@ static char *mpam_errcode_names[16] = {
|
|||
[12 ... 15] = "Reserved"
|
||||
};
|
||||
|
||||
static int mpam_enable_msc_ecr(void *_msc)
|
||||
{
|
||||
struct mpam_msc *msc = _msc;
|
||||
|
||||
__mpam_write_reg(msc, MPAMF_ECR, MPAMF_ECR_INTEN);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This can run in mpam_disable(), and the interrupt handler on the same CPU */
|
||||
static int mpam_disable_msc_ecr(void *_msc)
|
||||
{
|
||||
struct mpam_msc *msc = _msc;
|
||||
|
||||
__mpam_write_reg(msc, MPAMF_ECR, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static irqreturn_t __mpam_irq_handler(int irq, struct mpam_msc *msc)
|
||||
{
|
||||
u64 reg;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user