RE: [PATCH] - prof_cpu_mask problems

From: Luck, Tony <tony.luck_at_intel.com>
Date: 2003-11-18 04:16:01
> 	- the IRQ masks are displayed in an unusual format:
> 		# echo 12345678 >prof_cpu_mask
> 		# cat prof_cpu_mask
> 		5678123400000000

Although it's ugly ... that format seems to have been adopted in
generic code ... here's the code from drivers/base/node.c to
display the bitmap of cpus that belong to a node:

        for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
                int j = sprintf(buf, "%04hx", (u16)cpus_coerce(tmp));
                len += j;
                buf += j;
                cpus_shift_right(tmp, tmp, 16);
        }

There should be some consistency in how bitmaps from cpumask_t
get displayed, but it would also be nice if the 'write' interfaces
to settable cpumasks used the same format that the 'read'
interfaces printed.  E.g. I might want to do:

 # cat /sys/devices/system/node/node0/cpumap > /proc/irq/prof_cpu_mask

-Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Nov 17 12:23:19 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:20 EST