aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-09-12[PATCH] sparc64 audit syscall classes hookupAl Viro4-0/+110
... that should do it for all targets; the only remaining issues are mips (currently treated as non-biarch) and handling of other OS emulations (OSF/SunOS/Solaris/???). The latter would need to be assigned new AUDIT_ARCH_... ABI numbers anyway... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-09-08[PATCH] IA64,sparc: local DoS with corrupted ELFsKirill Korotaev1-16/+20
This prevents cross-region mappings on IA64 and SPARC which could lead to system crash. They were correctly trapped for normal mmap() calls, but not for the kernel internal calls generated by executable loading. This code just moves the architecture-specific cross-region checks into an arch-specific "arch_mmap_check()" macro, and defines that for the architectures that needed it (ia64, sparc and sparc64). Architectures that don't have any special requirements can just ignore the new cross-region check, since the mmap() code will just notice on its own when the macro isn't defined. Signed-off-by: Pavel Emelianov <xemul@openvz.org> Signed-off-by: Kirill Korotaev <dev@openvz.org> Acked-by: David Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> [ Cleaned up to not affect architectures that don't need it ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-29[SPARC64]: Fix X server hangs due to large pages.David S. Miller1-0/+2
This problem was introduced by changeset 14778d9072e53d2171f66ffd9657daff41acfaed Unlike the hugetlb code paths, the normal fault code is not setup to propagate PTE changes for large page sizes correctly like the ones we make for I/O mappings in io_remap_pfn_range(). It is absolutely necessary to update all sub-ptes of a largepage mapping on a fault. Adding special handling for this would add considerably complexity to tlb_batch_add(). So let's just side-step the issue and forcefully dirty any writable PTEs created by io_remap_pfn_range(). The only other real option would be to disable to large PTE code of io_remap_pfn_range() and we really don't want to do that. Much thanks to Mikael Pettersson for tracking down this problem and testing debug patches. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-24[SPARC64]: Explicitly print return PC when the kernel fault PC is bogus.David S. Miller1-0/+3
That way we'll have at least some debugging info even if the stack dump explodes. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-21[SPARC64]: Update defconfig.David S. Miller1-4/+4
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-21[SPARC]: Fix length parameter verification in sys_getdomainname().David S. Miller1-9/+9
Found by scrashme. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-21[SPARC]: Simplify and correct __cpu_find_by()David S. Miller1-3/+0
By using for_each_node_by_type(). Also, correct a spurioud test in check_cpu_node() on sparc64. It is only called with nodes that have device_type "cpu". Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-21[SPARC]: Kill prom_getname, unused and not implemented properly.David S. Miller2-86/+0
The m68k port's sun3 asm/oplib.h had a stray reference too, so I killed that off as well. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-21[SPARC64]: Fix more of_device layer IRQ bugs, and correct PROMREG_MAX.David S. Miller2-4/+42
Sabre and Psycho PCI controllers can have partial interrupt-map properties, meaning that on-board devices don't match up to any entries. Instead, they are fully specified from the beginning and we should pass them directly to the IRQ translator as-is. Also, fill in the necessary translator slots for the "graphics" and "expansion UPA" interrupts on Sabre, Psycho, and SYSIO SBUS. Increase PROMREG_MAX to 24, as seen on SUNW,ffb devices. Finally, prevent accidentally writing past the end of the of_device struct resource[] and irqs[] arrays. Spit out a log message when we ignore some entries because there are too many of them. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-14[SPARC64] Fix PSYCHO PCI controler init.Marc Zyngier1-1/+2
pbm->name should be initialized before calling pbm_register_toplevel_resources. Move the call a few lines down to avoid a nice Oops. Signed-off-by: Marc Zyngier <maz@misterjones.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-14[SPARC64] psycho: Fix pbm->name handling in pbm_register_toplevel_resources()David S. Miller1-3/+0
We shouldn't overwrite it, it's the device node full name already and that's what we want. Based upon a report from Marc Zyngier. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-14[SPARC64]: Make sure IRQs are disabled properly during early boot.David S. Miller2-9/+6
Else we trigger the new irqs_disable() assertion in start_kernel(). Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-13[SPARC]: Fix OF register translations under sub-PCI busses.David S. Miller1-146/+162
There is an implicit assumption in the code that ranges will translate to something that can fit in 2 32-bit cells, or a 64-bit value. For certain kinds of things below PCI this isn't necessarily true. Here is what the relevant OF device hierarchy looks like for one of the serial controllers on an Ultra5: Node 0xf005f1e0 ranges: 00000000.00000000.00000000.000001fe.01000000.00000000.01000000 01000000.00000000.00000000.000001fe.02000000.00000000.01000000 02000000.00000000.00000000.000001ff.00000000.00000001.00000000 03000000.00000000.00000000.000001ff.00000000.00000001.00000000 device_type: 'pci' model: 'SUNW,sabre' Node 0xf005f9d4 device_type: 'pci' model: 'SUNW,simba' Node 0xf0060d24 ranges: 00000010.00000000 82010810.00000000.f0000000 01000000 00000014.00000000 82010814.00000000.f1000000 00800000 name: 'ebus' Node 0xf0062dac reg: 00000014.003083f8.00000008 --> 0x1ff.f13083f8 device_type: 'serial' name: 'su' So the correct translation here is: 1) Match "su" register to second ranges entry of 'ebus', which translates into a PCI triplet "82010814.00000000.f1000000" of size 00800000, which gives us "82010814.00000000.f13083f8". 2) Pass-through "SUNW,simba" since it lacks ranges property 3) Match "82010814.00000000.f13083f8" to third ranges property of PCI controller node 'SUNW,sabre', and we arrive at the final physical MMIO address of "0x1fff13083f8". Due to the 2-cell assumption, we couldn't translate to a PCI 3-cell value, and we couldn't perform a pass-thru on it either. It was easiest to just stop splitting the ranges application operation between two methods, ->map and ->translate, and just let ->map do all the work. That way it would work purely on 32-bit cell arrays instead of having to "return" some value like a u64. It's still not %100 correct because the out-of-range check is still done using the 64 least significant bits of the range and address. But it does work for all the cases I've thrown at it so far. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-13[SPARC64]: Refine Sabre wsync logic.David S. Miller1-8/+27
It is only needed when there is a PCI-PCI bridge sitting between the device and the PCI host controller which is not a Simba APB bridge. Add logic to handle two special cases: 1) device behind EBUS, which sits on PCI 2) PCI controller interrupts Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-13[SPARC64]: Fix 2 bugs in sabre_irq_build()David S. Miller1-4/+26
When installing the IRQ pre-handler, we were not setting up the second argument correctly. It should be a pointer to the sabre_irq_data, not the config space PIO address. Furthermore, we only need this pre-handler installed if the device sits behind a PCI bridge that is not Sabre or Simba/APB. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-13[SPARC64]: Update defconfig.David S. Miller1-8/+31
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-13[SPARC64]: of_device_register() error checking fixAndrew Morton1-2/+4
device_create_file() can fail. This causes the sparc64 compile to fail when my fanatical __must_check patch is applied, due to -Werror. [ Added necessary identical fix for sparc32. -DaveM] Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-10[PATCH] disallow modular binfmt_elf32Christoph Hellwig1-1/+1
Currently most architectures either always build binfmt_elf32 in the kernel image or make it a boolean option. Only sparc64 and s390 allow to build it modularly. This patch turns the option into a boolean aswell because elf requires various symbols that shouldn't be available to modules. The most urgent one is tasklist_lock whos export this patch series kills, but there are others like force_sgi aswell. Note that sparc doesn't allow a modular 32bit a.out handler either, and that would be the more useful case as only few people want 32bit sunos compatibility and 99.9% of all sparc64 users need 32bit linux native elf support. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: "David S. Miller" <davem@davemloft.net> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-10[PATCH] tty: Remove include of screen_info.h from tty.hJon Smirl1-1/+1
screen_info.h doesn't have anything to do with the tty layer and shouldn't be included by tty.h. This patches removes the include and modifies all users to directly include screen_info.h. struct screen_info is mainly used to communicate with the console drivers in drivers/video/console. Note that this patch touches every arch and I have no way of testing it. If there is a mistake the worst thing that will happen is a compile error. [akpm@osdl.org: fix arm build] [akpm@osdl.org: fix alpha build] Signed-off-by: Jon Smirl <jonsmir@gmail.com> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-05[SPARC64]: Fix stack overflow checking in modular non-SMP kernels.Mikael Pettersson1-5/+5
The sparc64 kernel's EXPORT_SYMBOL(_mcount) is inside an #ifdef CONFIG_SMP. This breaks modules in non-SMP kernels built with stack overflow checking (CONFIG_STACK_DEBUG=y), as modules_install reports: WARNING: /lib/modules/2.6.17/kernel/drivers/ide/ide-cd.ko needs unknown symbol _mcount Trivially fixed by moving EXPORT_SYMBOL(_mcount) outside of the #ifdef CONFIG_SMP. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-05[SPARC64]: Fix sparc64 build errors when CONFIG_PCI=n.Randy Dunlap2-1/+6
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-02[PATCH] irq-flags: SPARC64: Use the new IRQF_ constantsThomas Gleixner5-21/+21
Use the new IRQF_ constants and remove the SA_INTERRUPT define Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-30Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds3-97/+26
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Kill sun4v virtual device layer. [SERIAL] sunhv: Convert to of_driver layer. [SPARC64]: Mask out top 8-bits in physical address when building resources. [SERIAL] sunsu: Missing return statement in su_probe().
2006-06-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds33-34/+0
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: Remove obsolete #include <linux/config.h> remove obsolete swsusp_encrypt arch/arm26/Kconfig typos Documentation/IPMI typos Kconfig: Typos in net/sched/Kconfig v9fs: do not include linux/version.h Documentation/DocBook/mtdnand.tmpl: typo fixes typo fixes: specfic -> specific typo fixes in Documentation/networking/pktgen.txt typo fixes: occuring -> occurring typo fixes: infomation -> information typo fixes: disadvantadge -> disadvantage typo fixes: aquire -> acquire typo fixes: mecanism -> mechanism typo fixes: bandwith -> bandwidth fix a typo in the RTC_CLASS help text smb is no longer maintained Manually merged trivial conflict in arch/um/kernel/vmlinux.lds.S
2006-06-30[SPARC64]: Kill sun4v virtual device layer.David S. Miller2-97/+23
Replace with a simple IRQ translater in the PROM device tree builder. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-30[SPARC64]: Mask out top 8-bits in physical address when building resources.David S. Miller1-0/+3
These top 8-bits are supposed to be ignored in the ranges and top-level reg properties on this platform. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-30[PATCH] zoned vm counters: conversion of nr_pagecache to per zone counterChristoph Lameter1-1/+1
Currently a single atomic variable is used to establish the size of the page cache in the whole machine. The zoned VM counters have the same method of implementation as the nr_pagecache code but also allow the determination of the pagecache size per zone. Remove the special implementation for nr_pagecache and make it a zoned counter named NR_FILE_PAGES. Updates of the page cache counters are always performed with interrupts off. We can therefore use the __ variant here. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel33-34/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-29[SPARC64]: Print symbol name of regs->tpc on kernel unaligned accesses.David S. Miller1-1/+3
This makes things easier to track down, especially in modules. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC64]: time: Kill unnecessary asm/{fhc,sbus,ebus,isa}.h includes.David S. Miller1-5/+2
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC64] power: Convert to of_driver.David S. Miller1-39/+18
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC64] auxio: Remove asm/{sbus,ebus}.h includes.David S. Miller1-3/+2
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC64]: of_device layer IRQ resolutionDavid S. Miller10-1048/+1091
Do IRQ determination generically by parsing the PROM properties, and using IRQ controller drivers for final resolution. One immediate positive effect is that all of the IRQ frobbing in the EBUS, ISA, and PCI controller layers has been eliminated. We just look up the of_device and use the properly computed value. The PCI controller irq_build() routines are gone and no longer used. Unfortunately sbus_build_irq() has to remain as there is a direct reference to this in the sunzilog driver. That can be killed off once the sparc32 side of this is written and the sunzilog driver is transformed into an "of" bus driver. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC64]: Fix typo in clock_probe().David S. Miller1-2/+2
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC64] clock: Only probe central fhc clock on Enterprise boxes.David S. Miller1-0/+7
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC64] power: Do not pass SA_SHIRQ to request_irq().David S. Miller1-1/+1
This needs to be a unique interrupt source because we do not have a register or similar to poll to make sure the IRQ is really for us. We do not have any dev_id to pass in anyways, and the generic IRQ layer is now enforcing that when SA_SHIRQ is specified, dev_id must be non-NULL. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC64]: Fix typo in isa_dev_get_irq_using_imap().David S. Miller1-1/+1
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC64]: Let irq_install_pre_handler() get called multiple times.David S. Miller1-0/+4
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC]: Convert clock drivers to of_driver framework.David S. Miller3-196/+54
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC64] auxio: Convert to pure of_device driver.David S. Miller1-49/+24
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC]: Add of_io{remap,unmap}().David S. Miller1-0/+17
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC]: Beginnings of generic of_device framework.David S. Miller1-2/+488
The idea is to fully construct the device register and interrupt values into these of_device objects, and convert all of SBUS, EBUS, ISA drivers to use this new stuff. Much ideas and code taken from Ben H.'s powerpc work. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC]: Add of_n_{addr,size}_cells().David S. Miller1-0/+30
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29[SPARC64]: Kill starfire_cookie from SBUS/PCI.David S. Miller3-9/+3
Totally unused. We need to traverse the list of global IRQ translaters, so storing it in the per-bus structures was useless. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-29Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6Linus Torvalds1-4/+0
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6: (22 commits) [PATCH] devfs: Remove it from the feature_removal.txt file [PATCH] devfs: Last little devfs cleanups throughout the kernel tree. [PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV [PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer needed [PATCH] devfs: Remove the line_driver devfs_name field as it's no longer needed [PATCH] devfs: Remove the videodevice devfs_name field as it's no longer needed [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed [PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree [PATCH] devfs: Remove devfs_remove() function from the kernel tree [PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree [PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree [PATCH] devfs: Remove devfs_mk_symlink() function from the kernel tree [PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree [PATCH] devfs: Remove devfs_*_tape() functions from the kernel tree [PATCH] devfs: Remove devfs support from the sound subsystem [PATCH] devfs: Remove devfs support from the ide subsystem. [PATCH] devfs: Remove devfs support from the serial subsystem [PATCH] devfs: Remove devfs from the init code [PATCH] devfs: Remove devfs from the partition code ...
2006-06-29Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds1-1/+1
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: [PATCH] i386: export memory more than 4G through /proc/iomem [PATCH] 64bit Resource: finally enable 64bit resource sizes [PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed [PATCH] 64bit resource: change pnp core to use resource_size_t [PATCH] 64bit resource: change pci core and arch code to use resource_size_t [PATCH] 64bit resource: change resource core to use resource_size_t [PATCH] 64bit resource: introduce resource_size_t for the start and end of struct resource [PATCH] 64bit resource: fix up printks for resources in misc drivers [PATCH] 64bit resource: fix up printks for resources in arch and core code [PATCH] 64bit resource: fix up printks for resources in pcmcia drivers [PATCH] 64bit resource: fix up printks for resources in video drivers [PATCH] 64bit resource: fix up printks for resources in ide drivers [PATCH] 64bit resource: fix up printks for resources in mtd drivers [PATCH] 64bit resource: fix up printks for resources in pci core and hotplug drivers [PATCH] 64bit resource: fix up printks for resources in networks drivers [PATCH] 64bit resource: fix up printks for resources in sound drivers [PATCH] 64bit resource: C99 changes for struct resource declarations Fixed up trivial conflict in drivers/ide/pci/cmd64x.c (the printk that was changed by the 64-bit resources had been deleted in the meantime ;)
2006-06-29[PATCH] genirq: cleanup: merge irq_affinity[] into irq_desc[]Ingo Molnar1-1/+1
Consolidation: remove the irq_affinity[NR_IRQS] array and move it into the irq_desc[NR_IRQS].affinity field. [akpm@osdl.org: sparc64 build fix] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-29[PATCH] genirq: rename desc->handler to desc->chipIngo Molnar1-5/+5
This patch-queue improves the generic IRQ layer to be truly generic, by adding various abstractions and features to it, without impacting existing functionality. While the queue can be best described as "fix and improve everything in the generic IRQ layer that we could think of", and thus it consists of many smaller features and lots of cleanups, the one feature that stands out most is the new 'irq chip' abstraction. The irq-chip abstraction is about describing and coding and IRQ controller driver by mapping its raw hardware capabilities [and quirks, if needed] in a straightforward way, without having to think about "IRQ flow" (level/edge/etc.) type of details. This stands in contrast with the current 'irq-type' model of genirq architectures, which 'mixes' raw hardware capabilities with 'flow' details. The patchset supports both types of irq controller designs at once, and converts i386 and x86_64 to the new irq-chip design. As a bonus side-effect of the irq-chip approach, chained interrupt controllers (master/slave PIC constructs, etc.) are now supported by design as well. The end result of this patchset intends to be simpler architecture-level code and more consolidation between architectures. We reused many bits of code and many concepts from Russell King's ARM IRQ layer, the merging of which was one of the motivations for this patchset. This patch: rename desc->handler to desc->chip. Originally i did not want to do this, because it's a big patch. But having both "desc->handler", "desc->handle_irq" and "action->handler" caused a large degree of confusion and made the code appear alot less clean than it truly is. I have also attempted a dual approach as well by introducing a desc->chip alias - but that just wasnt robust enough and broke frequently. So lets get over with this quickly. The conversion was done automatically via scripts and converts all the code in the kernel. This renaming patch is the first one amongst the patches, so that the remaining patches can stay flexible and can be merged and split up without having some big monolithic patch act as a merge barrier. [akpm@osdl.org: build fix] [akpm@osdl.org: another build fix] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27[PATCH] add poison.h and patch primary usersRandy Dunlap1-1/+2
Localize poison values into one header file for better documentation and easier/quicker debugging and so that the same values won't be used for multiple purposes. Use these constants in core arch., mm, driver, and fs code. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Matt Mackall <mpm@selenic.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27[PATCH] node hotplug: register cpu: remove node structKAMEZAWA Hiroyuki1-1/+1
With Goto-san's patch, we can add new pgdat/node at runtime. I'm now considering node-hot-add with cpu + memory on ACPI. I found acpi container, which describes node, could evaluate cpu before memory. This means cpu-hot-add occurs before memory hot add. In most part, cpu-hot-add doesn't depend on node hot add. But register_cpu(), which creates symbolic link from node to cpu, requires that node should be onlined before register_cpu(). When a node is onlined, its pgdat should be there. This patch-set holds off creating symbolic link from node to cpu until node is onlined. This removes node arguments from register_cpu(). Now, register_cpu() requires 'struct node' as its argument. But the array of struct node is now unified in driver/base/node.c now (By Goto's node hotplug patch). We can get struct node in generic way. So, this argument is not necessary now. This patch also guarantees add cpu under node only when node is onlined. It is necessary for node-hot-add vs. cpu-hot-add patch following this. Moreover, register_cpu calculates cpu->node_id by cpu_to_node() without regard to its 'struct node *root' argument. This patch removes it. Also modify callers of register_cpu()/unregister_cpu, whose args are changed by register-cpu-remove-node-struct patch. [Brice.Goglin@ens-lyon.org: fix it] Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: Ashok Raj <ashok.raj@intel.com> Cc: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>