Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101597
b: refs/heads/master
c: 1c8950f
h: refs/heads/master
i:
  101595: 8f86906
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed May 14, 2008
1 parent 0bcb116 commit 1659e48
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f1067c2d98ac1c43f0c82892f5647774a6ac759
refs/heads/master: 1c8950ff87de950a3b6ccfb26650fc0a56278836
7 changes: 6 additions & 1 deletion trunk/arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#define skipbl xmon_skipbl

#ifdef CONFIG_SMP
cpumask_t cpus_in_xmon = CPU_MASK_NONE;
static cpumask_t cpus_in_xmon = CPU_MASK_NONE;
static unsigned long xmon_taken = 1;
static int xmon_owner;
static int xmon_gate;
Expand Down Expand Up @@ -327,6 +327,11 @@ static void release_output_lock(void)
{
xmon_speaker = 0;
}

int cpus_are_in_xmon(void)
{
return !cpus_empty(cpus_in_xmon);
}
#endif

static int xmon_core(struct pt_regs *regs, int fromipi)
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/char/hvc_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,12 +675,6 @@ static int hvc_poll(struct hvc_struct *hp)
return poll_mask;
}

#if defined(CONFIG_XMON) && defined(CONFIG_SMP)
extern cpumask_t cpus_in_xmon;
#else
static const cpumask_t cpus_in_xmon = CPU_MASK_NONE;
#endif

/*
* This kthread is either polling or interrupt driven. This is determined by
* calling hvc_poll() who determines whether a console adapter support
Expand All @@ -698,7 +692,7 @@ static int khvcd(void *unused)
hvc_kicked = 0;
try_to_freeze();
wmb();
if (cpus_empty(cpus_in_xmon)) {
if (!cpus_are_in_xmon()) {
spin_lock(&hvc_structs_lock);
list_for_each_entry(hp, &hvc_structs, next) {
poll_mask |= hvc_poll(hp);
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/char/hvc_console.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,14 @@ extern struct hvc_struct * __devinit hvc_alloc(uint32_t vtermno, int irq,
/* remove a vterm from hvc tty operation (modele_exit or hotplug remove) */
extern int __devexit hvc_remove(struct hvc_struct *hp);


#if defined(CONFIG_XMON) && defined(CONFIG_SMP)
#include <asm/xmon.h>
#else
static inline int cpus_are_in_xmon(void)
{
return 0;
}
#endif

#endif // HVC_CONSOLE_H
4 changes: 4 additions & 0 deletions trunk/include/asm-powerpc/xmon.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ static inline void xmon_setup(void) { };
static inline void xmon_register_spus(struct list_head *list) { };
#endif

#if defined(CONFIG_XMON) && defined(CONFIG_SMP)
extern int cpus_are_in_xmon(void);
#endif

#endif /* __KERNEL __ */
#endif /* __ASM_POWERPC_XMON_H */

0 comments on commit 1659e48

Please sign in to comment.