mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
Final MIPS fixes for 4.17
A final few MIPS fixes for 4.17: - Drop Lantiq gphy reboot/remove reset (4.14) - prctl(PR_SET_FP_MODE): Disallow PRE without FR (4.0) - ptrace(PTRACE_PEEKUSR): Fix 64-bit FGRs (3.15) -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQS7lRNBWUYtqfDOVL41zuSGKxAj8gUCWxHFOwAKCRA1zuSGKxAj 8i39AQCX9phkffpRDnA1e/MiGGeRZ5+f9FBOzuS1x2nzdUagoQD9FzWxdcx57Syj ye0kUtmc/wm8U6kz3qC3OInSeVuIEQg= =3NGM -----END PGP SIGNATURE----- Merge tag 'mips_fixes_4.17_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from James Hogan: "A final few MIPS fixes for 4.17: - drop Lantiq gphy reboot/remove reset (4.14) - prctl(PR_SET_FP_MODE): Disallow PRE without FR (4.0) - ptrace(PTRACE_PEEKUSR): Fix 64-bit FGRs (3.15)" * tag 'mips_fixes_4.17_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: ptrace: Fix PTRACE_PEEKUSR requests for 64-bit FGRs MIPS: prctl: Disallow FRE without FR with PR_SET_FP_MODE requests MIPS: lantiq: gphy: Drop reboot/remove reset asserts
This commit is contained in:
commit
4277e6b9fd
@ -721,6 +721,10 @@ int mips_set_process_fp_mode(struct task_struct *task, unsigned int value)
|
||||
if (value & ~known_bits)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* Setting FRE without FR is not supported. */
|
||||
if ((value & (PR_FP_MODE_FR | PR_FP_MODE_FRE)) == PR_FP_MODE_FRE)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* Avoid inadvertently triggering emulation */
|
||||
if ((value & PR_FP_MODE_FR) && raw_cpu_has_fpu &&
|
||||
!(raw_current_cpu_data.fpu_id & MIPS_FPIR_F64))
|
||||
|
@ -818,7 +818,7 @@ long arch_ptrace(struct task_struct *child, long request,
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
tmp = get_fpr32(&fregs[addr - FPR_BASE], 0);
|
||||
tmp = get_fpr64(&fregs[addr - FPR_BASE], 0);
|
||||
break;
|
||||
case PC:
|
||||
tmp = regs->cp0_epc;
|
||||
|
@ -109,7 +109,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
|
||||
addr & 1);
|
||||
break;
|
||||
}
|
||||
tmp = get_fpr32(&fregs[addr - FPR_BASE], 0);
|
||||
tmp = get_fpr64(&fregs[addr - FPR_BASE], 0);
|
||||
break;
|
||||
case PC:
|
||||
tmp = regs->cp0_epc;
|
||||
|
@ -30,7 +30,6 @@ struct xway_gphy_priv {
|
||||
struct clk *gphy_clk_gate;
|
||||
struct reset_control *gphy_reset;
|
||||
struct reset_control *gphy_reset2;
|
||||
struct notifier_block gphy_reboot_nb;
|
||||
void __iomem *membase;
|
||||
char *fw_name;
|
||||
};
|
||||
@ -64,24 +63,6 @@ static const struct of_device_id xway_gphy_match[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, xway_gphy_match);
|
||||
|
||||
static struct xway_gphy_priv *to_xway_gphy_priv(struct notifier_block *nb)
|
||||
{
|
||||
return container_of(nb, struct xway_gphy_priv, gphy_reboot_nb);
|
||||
}
|
||||
|
||||
static int xway_gphy_reboot_notify(struct notifier_block *reboot_nb,
|
||||
unsigned long code, void *unused)
|
||||
{
|
||||
struct xway_gphy_priv *priv = to_xway_gphy_priv(reboot_nb);
|
||||
|
||||
if (priv) {
|
||||
reset_control_assert(priv->gphy_reset);
|
||||
reset_control_assert(priv->gphy_reset2);
|
||||
}
|
||||
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static int xway_gphy_load(struct device *dev, struct xway_gphy_priv *priv,
|
||||
dma_addr_t *dev_addr)
|
||||
{
|
||||
@ -205,14 +186,6 @@ static int xway_gphy_probe(struct platform_device *pdev)
|
||||
reset_control_deassert(priv->gphy_reset);
|
||||
reset_control_deassert(priv->gphy_reset2);
|
||||
|
||||
/* assert the gphy reset because it can hang after a reboot: */
|
||||
priv->gphy_reboot_nb.notifier_call = xway_gphy_reboot_notify;
|
||||
priv->gphy_reboot_nb.priority = -1;
|
||||
|
||||
ret = register_reboot_notifier(&priv->gphy_reboot_nb);
|
||||
if (ret)
|
||||
dev_warn(dev, "Failed to register reboot notifier\n");
|
||||
|
||||
platform_set_drvdata(pdev, priv);
|
||||
|
||||
return ret;
|
||||
@ -220,21 +193,12 @@ static int xway_gphy_probe(struct platform_device *pdev)
|
||||
|
||||
static int xway_gphy_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct xway_gphy_priv *priv = platform_get_drvdata(pdev);
|
||||
int ret;
|
||||
|
||||
reset_control_assert(priv->gphy_reset);
|
||||
reset_control_assert(priv->gphy_reset2);
|
||||
|
||||
iowrite32be(0, priv->membase);
|
||||
|
||||
clk_disable_unprepare(priv->gphy_clk_gate);
|
||||
|
||||
ret = unregister_reboot_notifier(&priv->gphy_reboot_nb);
|
||||
if (ret)
|
||||
dev_warn(dev, "Failed to unregister reboot notifier\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user