* [PATCH] topology: Provide CPU topology in sysfs in !SMP configurations
@ 2011-11-24 7:04 Ben Hutchings
2011-11-24 16:24 ` Greg KH
2012-01-03 15:54 ` Geert Uytterhoeven
0 siblings, 2 replies; 4+ messages in thread
From: Ben Hutchings @ 2011-11-24 7:04 UTC (permalink / raw)
To: Greg Kroah-Hartman, LKML; +Cc: Marcus Osdoba, 649216
We should provide topology information to userland even if it's not
very interesting. The current code appears to work properly for !SMP
(tested on i386).
Reference: http://bugs.debian.org/649216
Reported-by: Marcus Osdoba <marcus.osdoba@googlemail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/base/Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/Makefile b/drivers/base/Makefile
index 99a375a..1334d89 100644
--- a/drivers/base/Makefile
+++ b/drivers/base/Makefile
@@ -3,7 +3,8 @@
obj-y := core.o sys.o bus.o dd.o syscore.o \
driver.o class.o platform.o \
cpu.o firmware.o init.o map.o devres.o \
- attribute_container.o transport_class.o
+ attribute_container.o transport_class.o \
+ topology.o
obj-$(CONFIG_DEVTMPFS) += devtmpfs.o
obj-y += power/
obj-$(CONFIG_HAS_DMA) += dma-mapping.o
@@ -12,7 +13,6 @@ obj-$(CONFIG_ISA) += isa.o
obj-$(CONFIG_FW_LOADER) += firmware_class.o
obj-$(CONFIG_NUMA) += node.o
obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o
-obj-$(CONFIG_SMP) += topology.o
ifeq ($(CONFIG_SYSFS),y)
obj-$(CONFIG_MODULES) += module.o
endif
--
1.7.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] topology: Provide CPU topology in sysfs in !SMP configurations
2011-11-24 7:04 [PATCH] topology: Provide CPU topology in sysfs in !SMP configurations Ben Hutchings
@ 2011-11-24 16:24 ` Greg KH
2011-11-24 18:32 ` Ben Hutchings
2012-01-03 15:54 ` Geert Uytterhoeven
1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2011-11-24 16:24 UTC (permalink / raw)
To: Ben Hutchings; +Cc: LKML, Marcus Osdoba, 649216
On Thu, Nov 24, 2011 at 07:04:39AM +0000, Ben Hutchings wrote:
> We should provide topology information to userland even if it's not
> very interesting. The current code appears to work properly for !SMP
> (tested on i386).
Why, what will the topology look like for this?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] topology: Provide CPU topology in sysfs in !SMP configurations
2011-11-24 16:24 ` Greg KH
@ 2011-11-24 18:32 ` Ben Hutchings
0 siblings, 0 replies; 4+ messages in thread
From: Ben Hutchings @ 2011-11-24 18:32 UTC (permalink / raw)
To: Greg KH; +Cc: LKML, Marcus Osdoba, 649216
On Thu, Nov 24, 2011 at 08:24:26AM -0800, Greg KH wrote:
> On Thu, Nov 24, 2011 at 07:04:39AM +0000, Ben Hutchings wrote:
> > We should provide topology information to userland even if it's not
> > very interesting. The current code appears to work properly for !SMP
> > (tested on i386).
>
> Why, what will the topology look like for this?
physical_package_id: "-1"
core_id: "0"
thread_siblings: "1"
thread_siblings_list: "0"
core_siblings: "1"
core_siblings_list: "0"
Ben.
--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] topology: Provide CPU topology in sysfs in !SMP configurations
2011-11-24 7:04 [PATCH] topology: Provide CPU topology in sysfs in !SMP configurations Ben Hutchings
2011-11-24 16:24 ` Greg KH
@ 2012-01-03 15:54 ` Geert Uytterhoeven
1 sibling, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2012-01-03 15:54 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Greg Kroah-Hartman, LKML, Marcus Osdoba, 649216, Linux-Arch
On Thu, Nov 24, 2011 at 08:04, Ben Hutchings <ben@decadent.org.uk> wrote:
> We should provide topology information to userland even if it's not
> very interesting. The current code appears to work properly for !SMP
> (tested on i386).
>
> Reference: http://bugs.debian.org/649216
> Reported-by: Marcus Osdoba <marcus.osdoba@googlemail.com>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> drivers/base/Makefile | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/Makefile b/drivers/base/Makefile
> index 99a375a..1334d89 100644
> --- a/drivers/base/Makefile
> +++ b/drivers/base/Makefile
> @@ -3,7 +3,8 @@
> obj-y := core.o sys.o bus.o dd.o syscore.o \
> driver.o class.o platform.o \
> cpu.o firmware.o init.o map.o devres.o \
> - attribute_container.o transport_class.o
> + attribute_container.o transport_class.o \
> + topology.o
> obj-$(CONFIG_DEVTMPFS) += devtmpfs.o
> obj-y += power/
> obj-$(CONFIG_HAS_DMA) += dma-mapping.o
> @@ -12,7 +13,6 @@ obj-$(CONFIG_ISA) += isa.o
> obj-$(CONFIG_FW_LOADER) += firmware_class.o
> obj-$(CONFIG_NUMA) += node.o
> obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o
> -obj-$(CONFIG_SMP) += topology.o
> ifeq ($(CONFIG_SYSFS),y)
> obj-$(CONFIG_MODULES) += module.o
> endif
Taking this to linux-arch with a follow up from Ben due to crashes
reported on the
debian-m68k mailing list:
> > My guess is that on m68k get_cpu_sysdev(0) returns NULL and thus
> > topology_add_dev() passes an invalid pointer into sysfs_create_group().
> > So either m68k (and maybe some other architectures with no SMP support)
> > need to be fixed or the CPU topology code needs to allow for this.
>
> None of these architectures appears to call register_cpu():
>
> c6x frv h8300 m68k microblaze openrisc score um xtensa
>
> and therefore they will all panic at boot following this change (commit
> ccbc60d3e19a1b6ae66ca0d89b3da02dde62088b). So either I can try to fix
> them or else it must be reverted for now.
The commit mentioned above is in linux-next (and in Debian's 3.2-rc7).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-03 15:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24 7:04 [PATCH] topology: Provide CPU topology in sysfs in !SMP configurations Ben Hutchings
2011-11-24 16:24 ` Greg KH
2011-11-24 18:32 ` Ben Hutchings
2012-01-03 15:54 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox