diff options
author | Mandy Lavi <mandy.lavi@freescale.com> | 2013-07-07 10:56:29 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-07-22 22:26:43 (GMT) |
commit | ea5ff9f0b8c419fc3a60a6d746be9dead11227f4 (patch) | |
tree | 1709ae78d312990fbc01938d352c8dc77c9d2ead /drivers/net/ethernet/freescale/fman | |
parent | 6abee0dc69f0cafeb8b6981ba5cf5f8f894ea05f (diff) | |
download | linux-fsl-qoriq-ea5ff9f0b8c419fc3a60a6d746be9dead11227f4.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 ) |