{
s_time_t now = NOW();
unsigned int i, j, n;
- int err;
struct domain *d;
struct page_info *page;
unsigned int page_num_node[MAX_NUMNODES];
{
unsigned int start_cpu = ~0U;
- err = snprintf(keyhandler_scratch, 12, "%3u",
- vnuma->vnode_to_pnode[i]);
- if ( err < 0 || vnuma->vnode_to_pnode[i] == NUMA_NO_NODE )
- strlcpy(keyhandler_scratch, "???", sizeof(keyhandler_scratch));
-
- printk(" %3u: pnode %s,", i, keyhandler_scratch);
+ if ( vnuma->vnode_to_pnode[i] == NUMA_NO_NODE )
+ printk(" %3u: pnode ???,", i);
+ else
+ printk(" %3u: pnode %3u,", i, vnuma->vnode_to_pnode[i]);
printk(" vcpus ");
CHAR16 **leaf)
{
static EFI_GUID __initdata fs_protocol = SIMPLE_FILE_SYSTEM_PROTOCOL;
+ static CHAR16 __initdata buffer[512];
EFI_FILE_HANDLE dir_handle;
EFI_DEVICE_PATH *dp;
CHAR16 *pathend, *ptr;
if ( ret != EFI_SUCCESS )
PrintErrMesg(L"OpenVolume failure", ret);
-#define buffer ((CHAR16 *)keyhandler_scratch)
-#define BUFFERSIZE sizeof(keyhandler_scratch)
+#define BUFFERSIZE sizeof(buffer)
for ( dp = loaded_image->FilePath, *buffer = 0;
DevicePathType(dp) != END_DEVICE_PATH_TYPE;
dp = (void *)dp + DevicePathNodeLength(dp) )
static irq_keyhandler_fn_t do_toggle_alt_key, dump_registers,
reboot_machine, run_all_keyhandlers, do_debug_key;
-char keyhandler_scratch[1024];
-
static struct keyhandler {
union {
keyhandler_fn_t *fn;
machine_restart(0);
}
-static void periodic_timer_print(char *str, int size, uint64_t period)
-{
- if ( period == 0 )
- {
- strlcpy(str, "No periodic timer", size);
- return;
- }
-
- snprintf(str, size,
- "%u Hz periodic timer (period %u ms)",
- 1000000000/(int)period, (int)period/1000000);
-}
-
static void dump_domains(unsigned char key)
{
struct domain *d;
struct vcpu *v;
s_time_t now = NOW();
-#define tmpstr keyhandler_scratch
printk("'%c' pressed -> dumping domain info (now = %"PRI_stime")\n",
key, now);
printk(" pause_count=%d pause_flags=%lx\n",
atomic_read(&v->pause_count), v->pause_flags);
arch_dump_vcpu_info(v);
- periodic_timer_print(tmpstr, sizeof(tmpstr), v->periodic_period);
- printk(" %s\n", tmpstr);
+
+ if ( v->periodic_period == 0 )
+ printk("No periodic timer\n");
+ else
+ printk("%"PRI_stime" Hz periodic timer (period %"PRI_stime" ms)\n",
+ 1000000000 / v->periodic_period,
+ v->periodic_period / 1000000);
}
}
arch_dump_shared_mem_info();
rcu_read_unlock(&domlist_read_lock);
-#undef tmpstr
}
static cpumask_t read_clocks_cpumask;
/* Inject a keypress into the key-handling subsystem. */
extern void handle_keypress(unsigned char key, struct cpu_user_regs *regs);
-/* Scratch space is available for use of any keyhandler. */
-extern char keyhandler_scratch[1024];
-
#endif /* __XEN_KEYHANDLER_H__ */