Commit Graph

1368 Commits

Author SHA1 Message Date
David S. Miller 2eb2f77900 sparc64: Disable timer interrupts in fixup_irqs().
When a CPU is offlined, we leave the timer interrupts disabled
because fixup_irqs() does not explicitly take care of that case.

Fix this by invoking tick_ops->disable_irq().

Based upon analysis done by Paul E. McKenney.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-08 17:21:07 -07:00
David S. Miller 98d86c0915 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Conflicts:

	arch/sparc/kernel/of_device.c
2008-09-08 15:39:30 -07:00
Krzysztof Helt 3baca76f56 sparc64: fix wrong m48t59 RTC year
Correctly calculate offset to the year register for
Mostek RTC.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-07 18:12:59 -07:00
Paul E. McKenney 4d084617fb sparc64: Prevent sparc64 from invoking irq handlers on offline CPUs
Make sparc64 refrain from clearing a given to-be-offlined CPU's bit in the
cpu_online_mask until it has processed pending irqs.  This change
prevents other CPUs from being blindsided by an apparently offline CPU
nevertheless changing globally visible state.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 02:15:30 -07:00
David S. Miller e5bd1c3fdd sparc64: Fix IPI call locking.
When I switched sparc64 over to the generic helpers for
smp_call_function(), I didn't convert the dinky call_lock
we had.

Use ipi_call_lock() and ipi_call_unlock().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 02:14:39 -07:00
David S. Miller 5280267c1d sparc: Fix handling of LANCE and ESP parent nodes in of_device.c
The device nodes that sit above 'esp' and 'le' on SBUS lack a 'ranges'
property, but we should pass the translation up to the parent node so
that the SBUS level ranges get applied.

Based upon a bug report from Robert Reif.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 02:05:19 -07:00
David S. Miller 8aef727861 pci_sun4v: Use of_get_property().
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:52:56 -07:00
David S. Miller 463801b3ae pci_schizo: Use of_get_property() and delete spurious local vars.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:52:55 -07:00
David S. Miller 0f73d1bbe6 pci_psycho: Use of_getintprop_default().
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:52:54 -07:00
David S. Miller 446139a8f7 sparc64: Implement SSTATE purely using notifiers and initcalls.
Don't clutter up the tree with sstate_blah() scattered all over the
place.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:49:38 -07:00
David S. Miller cdb3592a20 sparc64: Move reboot handling into seperate file and kill power reg programming.
We should always use prom_power_off().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:31:11 -07:00
David S. Miller e822358ac2 sparc64: Pass proper parent device down into root pci_create_bus() call.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-01 18:32:22 -07:00
David S. Miller 7cc288add4 sparc64: Kill the scan_bus function pointer in struct pci_pbm_info.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-01 18:32:13 -07:00
David S. Miller fefbbc73ca sparc64: Use ENTRY/ENDPROC in PCI SUN4V asm.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-01 03:18:49 -07:00
David S. Miller 687124dda0 sparc64: Use ENTRY/ENDPROC in hypervisor asm.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-01 03:13:17 -07:00
David S. Miller 3d452e55ef sparc64: Apply const or __initdata to vio_device_id[]
This mirrors the of_device_id[] changes done in
fd098316ef ("sparc: Annotate
of_device_id arrays with const or __initdata.")

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-01 01:48:52 -07:00
David S. Miller ba4962d7a6 sparc64: Clean up CPU chip type probing code.
Three main things:

1) Make prober an arch initcall instead of using hard-coded invocation
   from paging_init()

2) Shrink table size, the fpu ident stuff was never used.

3) Use named struct initialized in table.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 21:48:12 -07:00
David S. Miller b69416b51b sparc64: Rewrite central driver.
This driver is now limited to just doing the basic clock board and FHC
chip initialization and registering the platform devices for the
per-board LEDs, which are driven by the new LEDS_STARFIRE driver.

The IRQ register handling is already confined purely to the device
tree code.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 20:56:15 -07:00
David S. Miller 10d29ff907 sparc64: Delete starfire_cpu_setup().
It does nothing.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 01:40:12 -07:00
David S. Miller d7472c389e sparc64: Simplify error handling in PCI controller probing.
Based upon suggestions from Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 01:33:52 -07:00
David S. Miller fd098316ef sparc: Annotate of_device_id arrays with const or __initdata.
As suggested by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 01:23:17 -07:00
David S. Miller c8049966b7 sparc64: Convert FIRE PCI controller driver into a real driver.
And now all the by-hand PCI controller probing junk in pci.c can die too.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 03:14:14 -07:00
David S. Miller edbe805b2b sparc64: Convert SABRE PCI controller driver into a real driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 03:14:01 -07:00
David S. Miller b20bfe41ba sparc64: Convert PSYCHO PCI controller driver into a real driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 03:13:20 -07:00
David S. Miller 3822b50964 sparc64: Convert SUN4V PCI controller driver into a real driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 02:50:29 -07:00
David S. Miller 6d19c88f53 sparc64: Convert SCHIZO PCI controller driver into a real driver.
The idea is to convert all of the PCI controller drivers into
genuine OF drivers, then we can get rid of this terrible probing
table and infrastructure in arch/sparc64/kernel/pci.c

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 02:30:24 -07:00
David S. Miller dbb8c35d90 sparc64: setup_valid_addr_bitmap_from_pavail() should be __init
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 02:04:45 -07:00
David S. Miller c510b9bfa1 sparc64: Don't invoke power_init() from pcibios_init().
That's just silly, use device_initcall() instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 01:18:56 -07:00
David S. Miller e0ac612e69 sparc: Kill ebus_bus_type.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 00:37:36 -07:00
David S. Miller 356d164757 sparc: Kill EBUS driver layer.
All that remains is the EBUS DMA programming library for
sparc64.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 00:36:11 -07:00
David S. Miller aae7fb87ec sparc: Move EBUS DMA interfaces into seperate header file.
These have no dependencies on the EBUS probing layer, the clients
setup the registers and all of those details.  The EBUS DMA layer
just programs and manages the DMA controller found in EBUS.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 23:10:21 -07:00
David S. Miller ae05f87ee2 sparc64: Propagate PCI device archdata into OF device tree for EBUS.
In order to convert EBUS drivers doing DMA into pure OF drivers,
we need the of_device->dev.archdata setup properly.

EBUS instances that can provide DMA for device nodes sit on PCI,
so detect and propagate the information there.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 22:42:34 -07:00
David S. Miller f2be6de88d sparc64: Use generic starfire RTC driver.
Also, delete the mini RTC driver, no longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:52 -07:00
David S. Miller 84d6bd5ef7 sparc64: Use generic sun4v RTC driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:51 -07:00
David S. Miller 29b503f11c sparc64: Use generic BQ4802 RTC driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:50 -07:00
David S. Miller da86783dda sparc64: Use generic CMOS driver.
Based largely upon a patch by Krzysztof Helt <krzysztof.h1@poczta.fm>

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:48 -07:00
David S. Miller 1518e7ed08 sparc64: Convert Mostek rtc to use generic RTC layer driver.
Based largely upon a patch by Krzysztof Helt <krzysztof.h1@poczta.fm>

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:47 -07:00
David S. Miller a0b31b578f sparc64: Check for RTC class device in update_persistent_clock().
As we convert the various by-hand sparc64 RTC drivers to use the
generic RTC framework and drivers, we need to keep the NTP
set_rtc_mmss() support via update_persistent_clock() working.

In the end, after all the RTC device cases are converted, this
local set_rtc_mmss() function will be deleted.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:46 -07:00
David S. Miller 90de9dea3b sparc64: Select RTC_CLASS
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:45 -07:00
David S. Miller 9dc69230a9 sparc: Kill now spurious includes of sbus.h
In order to make this week I also had to add an include
of linux/dma-mapping.h to asm/pci_32.h because drivers/pci/pci.c
really depends upon getting this header somehow.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:23 -07:00
David S. Miller 47a2d72885 sparc: Kill sbus_bus_type.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:22 -07:00
David S. Miller 046e26a8ba sparc: Remove generic SBUS probing layer.
The individual SBUS IOMMU arch code now sets the IOMMU information
directly into the OF device objects.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:21 -07:00
David S. Miller 5059625ed8 sparc: Add OF archdata propagation helper.
Add a helper function that, given a bus of_device node, propagates
all iommu, stc, and host_controller values down to the child nodes.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:20 -07:00
David S. Miller f8e4d32cb5 sparc: Kill sbus_arch_preinit().
32-bit sparc just needed it to register the ioport procfs bits, do this
via an arch_initcall() instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:19 -07:00
David S. Miller 98261dd1a3 sparc: Remove dinky old-style SBUS probing facilities.
No drivers or code uses this stuff any more, every driver has been
converted over to OF device probing.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:12 -07:00
David S. Miller 104364810f sparc: Remove SBUS layer resource and irq handling.
All the drivers use OF device objects now for this
information.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:11 -07:00
David S. Miller 33c4655c00 sparc: Kill SBUS layer IRQ hooks.
IRQs are obtained by drivers from the of_device struct.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:10 -07:00
David S. Miller 63237eeb5a sparc: Move SBUS DMA attribute interfaces out of asm/sbus.h
This is in preparation for the subsequent asm/sbus.h removal.

Also, make these routines take a "struct device" or no
arguments, as appropriate.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:13:31 -07:00
David S. Miller 738f2b7b81 sparc: Convert all SBUS drivers to dma_*() interfaces.
And all the SBUS dma interfaces are deleted.

A private implementation remains inside of the 32-bit sparc port which
exists only for the sake of the implementation of dma_*().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:13:15 -07:00
David S. Miller 7a715f4601 sparc: Make SBUS DMA interfaces take struct device.
This is the first step in converting all the SBUS drivers
over to generic dma_*().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:13:12 -07:00
David S. Miller 334ae61477 sparc: Kill SBUS DVMA layer.
This thing was completely pointless.

Just find the OF device in the parent of drivers that want to program
this device, and map the DMA regs inside such drivers too.

This also moves the dummy claim_dma_lock() and release_dma_lock()
implementation to floppy_32.h, which makes it handle this issue
just like floppy_64.h does.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:13:10 -07:00
David S. Miller 902663f6ea sparc: Delete bare sbus char bpp driver, obsoleted by parport_sunbpp
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:13:08 -07:00
David S. Miller e3c71a3291 sparc: Fix resource flags for PCI children in OF device tree.
When a device is under an EBUS or ISA bus, the resource flags
don't get set properly.

Fix this by re-evaluating the resource flags at each level of
bus as we apply ranges on the way to the root.  And let PCI
override any existing flags setting, but don't let the
default flags calculator make such overrides.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-28 22:59:10 -07:00
David S. Miller 51e0f004a9 sparc64: Fix irq_of_parse_and_map() and irq_dispose_mapping().
Stephen Rothwell noticed that I committed an earlier version
of the patch that didn't have two things fixed:

1) irq_of_parse_and_map() should return "unsigned int" not "int"
   and it should return zero for "no irq"

2) irq_dispose_mapping() should be an inline function, not a macro,
   for type checking

With feedback and suggestions from Anton Vorontsov.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-25 16:44:58 -07:00
David S. Miller 783c98b911 sparc64: Use the cond_syscall()s in kernel/sys_ni.c instead of home-grown copy.
This also allows arch/sparc64/kernel/pci.c to be properly CONFIG_PCI
conditional compiled in the Makefile.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-25 16:21:08 -07:00
David S. Miller 85269eb554 sparc64: Add JBUS UltraSPARC-IIIi support to memory controller driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-25 13:38:30 -07:00
David S. Miller 41660e9ac6 sparc64: Allow chmc to be built as a module.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 22:17:29 -07:00
David S. Miller 881d021ab0 sparc64: Add generic interface for registering a dimm printing handler.
The way to do this varies by platform type and the exact memory
controller the cpu uses.

For Spitfire cpus we currently just use prom_getunumber() and hope
that works.

For Cheetah cpus we have a memory controller driver that can
compute this information.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 22:08:34 -07:00
David S. Miller 83ef64b9de sparc64: Use consistent chmc_ prefix in variables, types, and functions.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 21:45:44 -07:00
David S. Miller b28422e32b sparc64: Convert UltraSPARC-III memory controller driver to OF driver probing.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 21:32:42 -07:00
David S. Miller 8394b3a84b sparc64: Kill duplicated sys_pause() implementation.
sys32_pause() is identical to the generically provided
sys_pause() in kernel/signal.c

Noticed by Christoph Hellwig.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 20:34:38 -07:00
David S. Miller fe06ccaad2 sparc64: Split syscall_trace() into two functions.
Christoph Hellwig noticed that having both entry and exit
logic in one function no longer makes sense, and having
seperate ones simplifies things a lot.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 20:34:31 -07:00
David S. Miller 15df0f3302 sparc: Add GPIO layer support.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 20:33:56 -07:00
David S. Miller 44266215e3 sparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().
This allows more OF layer code to be shared between powerpc and
sparc.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 20:33:55 -07:00
David S. Miller 2481d76615 sparc: Add mutex for set property calls.
On some platforms, the I2C controller is shared between the OS and
OBP.  OBP uses this I2C controller to access the EEPROM, and thus is
programmed when the kernel calls prom_setprop().

Wrap such calls with the new of_set_property_mutex.

Relevant I2C bus drivers can grab this mutex around top-level I2C
operations to provide the proper protection.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 20:33:55 -07:00
David S. Miller 072bd413b8 sparc64: Add JBUS NUMA detection.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 20:33:54 -07:00
David S. Miller a39f2f466f sparc64: Make NUMA depend upon SMP.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24 19:41:43 -07:00
David S. Miller f2b6079464 sparc64: Fix cmdline_memory_size handling bugs.
First, lmb_enforce_memory_limit() interprets it's argument
(mostly, heh) as a size limit not an address limit.  So pass
the raw cmdline_memory_size value into it.  And we don't
need to check it against zero, lmb_enforce_memory_limit() does
that for us.

Next, free_initmem() needs special handling when the kernel
command line trims the available memory.  The problem case is
if the trimmed out memory is where the kernel image itself
resides.

When that memory is trimmed out, we don't add those physical
ram areas to the sparsemem active ranges, amongst other things.
Which means that this free_initmem() code will free up invalid
page structs, resulting in either crashes or hangs.

Just quick fix this by not freeing initmem at all if "mem="
was given on the boot command line.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-14 01:45:41 -07:00
David S. Miller c918dcce92 sparc64: Fix overshoot in nid_range().
If 'start' does not begin on a page boundary, we can overshoot
past 'end'.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-14 01:41:39 -07:00
David S. Miller 6f63e781ea sparc64: Handle stack trace attempts before irqstacks are setup.
Things like lockdep can try to do stack backtraces before
the irqstack blocks have been setup.  So don't try to match
their ranges so early on.

Also, remove unused variable in save_stack_trace().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-13 17:20:04 -07:00
David S. Miller 4f70f7a91b sparc64: Implement IRQ stacks.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-12 18:33:56 -07:00
David S. Miller c7498081a6 sparc64: Fix recursion in stack overflow detection handling.
The calls down into prom_printf() when we detect an overflowed stack
can recurse again since the overflow stack will be "below" the current
kernel stack limit.

Prevent this by just returning straight if we are on the stack
overflow safe stack already.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-12 02:03:49 -07:00
David S. Miller b6b7922fbd sparc64: Don't MAGIC_SYSRQ ifdef smp_fetch_global_regs and support code.
Based upon a report and initial patch by Friedrich Oslage.

The intention is to provide this facility for
__trigger_all_cpu_backtrace even if MAGIC_SYSRQ is not set.

The only part that should have MAGIC_SYSRQ ifdef protection is the
sparc_globalreg_op sysrq regitration and immediate code.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-09 16:25:26 -07:00
David S. Miller 433c5f7068 sparc64: Fix end-of-stack checking in save_stack_trace().
Bug reported by Alexander Beregalov.

Before we dereference the stack frame or try to peek at the
pt_regs magic value, make sure the entire object is within
the kernel stack bounds.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-07 23:04:37 -07:00
Stephen Rothwell 764f2579d9 sparc: don't use asm/of_device.h
Use linux/of_device.h instead.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-07 15:33:36 -07:00
David S. Miller ea771bd51c sparc64: Use kernel/uid16.c helpers instead of own copy.
Noticed by Adrian Bunk.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-06 23:11:08 -07:00
David S. Miller ae583885bf sparc64: Remove all cpumask_t local variables in xcall dispatch.
All of the xcall delivery implementation is cpumask agnostic, so
we can pass around pointers to const cpumask_t objects everywhere.

The sad remaining case is the argument to arch_send_call_function_ipi().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 16:56:15 -07:00
David S. Miller ed4d9c66eb sparc64: Kill error_mask from hypervisor_xcall_deliver().
It can eat up a lot of stack space when NR_CPUS is large.
We retain some of it's functionality by reporting at least one
of the cpu's which are seen in error state.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 16:47:57 -07:00
David S. Miller 90f7ae8a55 sparc64: Build cpu list and mondo block at top-level xcall_deliver().
Then modify all of the xcall dispatch implementations get passed and
use this information.

Now all of the xcall dispatch implementations do not need to be mindful
of details such as "is current cpu in the list?" and "is cpu online?"

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 16:42:58 -07:00
David S. Miller c02a5119e8 sparc64: Disable local interrupts around xcall_deliver_impl() invocation.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 16:18:40 -07:00
David S. Miller deb16999e4 sparc64: Make all xcall_deliver's go through common helper function.
This just facilitates the next changeset where we'll be building
the cpu list and mondo block in this helper function.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 16:16:20 -07:00
David S. Miller 43f589235e sparc64: Always allocate the send mondo blocks, even on non-sun4v.
The idea is that we'll use this cpu list array and mondo block
even for non-hypervisor platforms.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 16:13:51 -07:00
David S. Miller 91a4231cc2 sparc64: Make smp_cross_call_masked() take a cpumask_t pointer.
Ideally this could be simplified further such that we could pass
the pointer down directly into the xcall_deliver() implementation.

But if we do that we need to do the "cpu_online(cpu)" and
"cpu != self" checks down in those functions.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 13:51:40 -07:00
David S. Miller 24445a4ac9 sparc64: Directly call xcall_deliver() in smp_start_sync_tick_client.
We know the cpu is online and not the current cpu here.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 13:51:40 -07:00
David S. Miller 1992663053 sparc64: Call xcall_deliver() directly in some cases.
For these cases the callers make sure:

1) The cpus indicated are online.

2) The current cpu is not in the list of indicated cpus.

Therefore we can pass a pointer to the mask directly.

One of the motivations in this transformation is to make use of
"&cpumask_of_cpu(cpu)" which evaluates to a pointer to constant
data in the kernel and thus takes up no stack space.

Hopefully someone in the future will change the interface of
arch_send_call_function_ipi() such that it passes a const cpumask_t
pointer so that this will optimize ever further.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 13:51:39 -07:00
David S. Miller cd5bc89deb sparc64: Use cpumask_t pointers and for_each_cpu_mask_nr() in xcall_deliver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 13:51:38 -07:00
David S. Miller 622824dbb5 sparc64: Use xcall_deliver() consistently.
There remained some spots still vectoring to the appropriate
*_xcall_deliver() function manually.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 13:51:37 -07:00
David S. Miller 5e0797e5b8 sparc64: Use function pointer for cross-call sending.
Initialize it using the smp_setup_processor_id() hook.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 13:51:37 -07:00
Huang Weiyi abd9e69828 arch/sparc64/kernel/signal.c: removed duplicated #include
Removed duplicated #include <linux/tracehook.h> in
arch/sparc64/kernel/signal.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 13:51:36 -07:00
David S. Miller a3cf5e6b6f sparc64: Need to disable preemption around smp_tsb_sync().
Based upon a bug report by Mariusz Kozlowski

It uses smp_call_function_masked() now, which has a preemption-disabled
requirement.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-04 13:51:35 -07:00
David S. Miller 0a4949c441 sparc64: Do not clobber %g7 in setcontext() trap.
That's the userland thread register, so we should never try to change
it like this.

Based upon glibc bug nptl/6577 and suggestions by Jakub Jelinek.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31 20:40:46 -07:00
David S. Miller dbf3e95067 sparc64: Kill __show_regs().
The story is that what we used to do when we actually used
smp_report_regs() is that if you specifically only wanted to have the
current cpu's registers dumped you would call "__show_regs()"
otherwise you would call show_regs() which also invoked
smp_report_regs().

Now that we killed off smp_report_regs() there is no longer any
reason to have these two routines, just show_regs() is sufficient.

Also kill off a stray declaration of show_regs() in sparc64_ksym.c

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31 20:33:43 -07:00
David S. Miller 9c636e30a3 sparc64: Kill smp_report_regs().
All the call sites are #if 0'd out and we have a much more
useful global cpu dumping facility these days.  smp_report_regs()
is way too verbose to be usable.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31 01:06:02 -07:00
David S. Miller a014821340 sparc64: Kill VERBOSE_SHOWREGS code.
It just clutters everything up and even though I wrote that hack I
can't remember having used it in the last 5 years or so.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31 00:58:35 -07:00
David S. Miller 09ee167cbf sparc64: Hook up trigger_all_cpu_backtrace().
We already have code that does this, but it is only currently attached
to sysrq-'y'.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-30 22:35:00 -07:00
David S. Miller 5afe27380b sparc64: Make global reg dumping even more useful.
Record one more level of stack frame program counter.

Particularly when lockdep and all sorts of spinlock debugging is
enabled, figuring out the caller of spin_lock() is difficult when the
cpu is stuck on the lock.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-30 21:57:59 -07:00
David S. Miller 71fc324b5b sparc64: Kill isa_bus_type.
I forgot to delete this when I removed the ISA bus layer
from the sparc ports.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-29 23:47:17 -07:00
David S. Miller 17b6f586b8 sparc64: Fix global reg snapshotting on self-cpu.
We were picking %i7 out of the wrong register window
stack slot.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-28 00:44:29 -07:00
Roland McGrath 768225868c sparc64: tracehook: CONFIG_HAVE_ARCH_TRACEHOOK
The sparc64 arch code has all the prerequisites, so set HAVE_ARCH_TRACEHOOK.

Signed-off-by: Roland McGrath <roland@redhat.com>
2008-07-27 17:33:07 -07:00
Roland McGrath 95698466cf sparc64: tracehook_signal_handler
Call the standard hook after setting up signal handlers.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-27 17:32:35 -07:00