diff options
author | Mandy Lavi <mandy.lavi@freescale.com> | 2013-07-07 10:56:29 (GMT) |
---|---|---|
committer | J. German Rivera <Jose.G.Rivera@freescale.com> | 2013-08-12 21:38:38 (GMT) |
commit | 7f25123acd0cdbf95b1cf7d66b74d03f3b30f6ae (patch) | |
tree | 4b0383b6ed80fefc7fc459f209a6579b99ed3663 /drivers/net/ethernet/freescale/fman | |
parent | aa57f7af3c9857ba40c8e1dd8dbefd5f0aa67d94 (diff) | |
download | linux-fsl-qoriq-7f25123acd0cdbf95b1cf7d66b74d03f3b30f6ae.tar.xz |
fmd: better support debug in preemptible kernel
Prevent sleeping function to be called from invalid context
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com>
Change-Id: I1fa7619489248c823d55a96b00cc4b7bd75bbf6d
Reviewed-on: http://git.am.freescale.net:8181/3430
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman')
-rw-r--r-- | drivers/net/ethernet/freescale/fman/src/xx/xx_linux.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/fman/src/xx/xx_linux.c b/drivers/net/ethernet/freescale/fman/src/xx/xx_linux.c index 9c2371d..132459b 100644 --- a/drivers/net/ethernet/freescale/fman/src/xx/xx_linux.c +++ b/drivers/net/ethernet/freescale/fman/src/xx/xx_linux.c @@ -168,7 +168,7 @@ void XX_Print(char *str, ...) #ifdef CONFIG_SMP if (vsnprintf (buf, BUF_SIZE, str, args) >= BUF_SIZE) printk(KERN_WARNING "Illegal string to print!\n more than %d characters.\n\tString was not printed completelly.\n", BUF_SIZE); - printk (KERN_CRIT "cpu%d: %s",raw_smp_processor_id(), buf); + printk(KERN_CRIT "cpu%d/%d: %s", get_hard_smp_processor_id(raw_smp_processor_id()), raw_smp_processor_id(), buf); #else vprintk(str, args); #endif /* CONFIG_SMP */ @@ -186,7 +186,8 @@ void XX_Fprint(void *file, char *str, ...) #ifdef CONFIG_SMP if (vsnprintf (buf, BUF_SIZE, str, args) >= BUF_SIZE) printk(KERN_WARNING "Illegal string to print!\n more than %d characters.\n\tString was not printed completelly.\n", BUF_SIZE); - printk (KERN_CRIT "cpu%d: %s", raw_smp_processor_id(), buf); + printk (KERN_CRIT "cpu%d/%d: %s",hard_smp_processor_id(), smp_processor_id(), buf); + #else vprintk(str, args); #endif /* CONFIG_SMP */ @@ -353,14 +354,14 @@ uint32_t XX_DisableAllIntr(void) { unsigned long flags; - local_irq_save(flags); + local_irq_save_nort(flags); return (uint32_t)flags; } void XX_RestoreAllIntr(uint32_t flags) { - local_irq_restore((unsigned long)flags); + local_irq_restore_nort((unsigned long)flags); } t_Error XX_Call( uint32_t qid, t_Error (* f)(t_Handle), t_Handle id, t_Handle appId, uint16_t flags ) |