Commit Graph

1340 Commits

Author SHA1 Message Date
David S. Miller
3c50370103 sparc: Fix user_regset 'n' field values.
As noticed by Russell King, we were not setting this properly
to the number of entries, but rather the total size.

This results in the core dumping code allocating waayyyy too
much memory.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-12 15:01:31 -07:00
David S. Miller
3ab5827eb0 sparc64: Fix sparse warnings in chmc.c
Several constants are larger than 32-bit and need "UL" markers.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-12 00:22:42 -07:00
David S. Miller
af1ee569d3 sparc64: Kill sparse warnings in mm/init.h
1) Several exported symbols need extern decls, they are exported
   not for C code but for assembler routines.

2) PAGE_EXEC isn't used, delete

3) Several larger than 32-bit constants need "UL" markers

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-12 00:19:21 -07:00
David S. Miller
b539c46766 sparc64: Fix sparse warnings in fault.c
1) set_brkpt() is referenced by nothing and hasn't been used by anyone
   to my knowledge for many many years.  So just delete it.

2) add extern decl for do_sparc64_fault() in asm/pgtable_64.h

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-12 00:10:32 -07:00
David S. Miller
a9e7bb0410 sparc64: Remove explicit initialization of mmu_gathers
This was just needed to work around an ancient gcc bug that
we don't care about any more.

It was also causing a sparse warnings:

arch/sparc64/mm/tlb.c:22:52: warning: Using plain integer as NULL pointer

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-12 00:06:58 -07:00
David S. Miller
7694b024f1 sparc64: Fix sparse warnings in vio.c
Several variables should be marked static.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-12 00:04:33 -07:00
David S. Miller
8d2aec5123 sparc64: Fix sparse warnings in pci_sun4v.c
'err' variable shadowing in pci_sun4v_probe()

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-12 00:01:03 -07:00
David S. Miller
77d10d0e63 sparc64: Fix sparse warnings in pci.c
1) Declare pci_poke_* in pci_impl.h
2) of_create_pci_dev() should be static
3) ->setup_msi_irq() wants an unsigned int pointer not a plain
   int one
4) void value expression return in arch_teardown_msi_irq()

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:57:40 -07:00
David S. Miller
21cd883393 sparc64: Fix sparse warnings in of_device.c
Passing unsigned int pointer where plain int pointer is
expected.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:53:41 -07:00
David S. Miller
c91e2ecad0 sparc64: Fix sparse warnings in prom.c
1) Testing null with '0'
2) returning void-valued expression

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:52:35 -07:00
David S. Miller
7e0b1e6186 sparc64: Fix sparse warnings in visemul.c
1) edge8 tables should be static
2) add vis_emul() extern decl. to asm/visasm.h

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:46:40 -07:00
David S. Miller
d8ada0a2cd sparc64: Fix sparse warnings in kernel/time.c
1) Using "clock" as a local variable shadows a global variable of
   the same name declared in linux/clocksource.h

2) rtc_cmos_resource should be static

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:39:11 -07:00
David S. Miller
17f04fbb0f sysctl: Use header file for sysctl knob declarations on sparc.
This also takes care of a sparse warning as scons_pwroff's definition
point.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:33:53 -07:00
David S. Miller
8f20b20de7 sparc64: Fix sparse warnings in global reg snapshotting.
Lots of shadowed local variables and global_reg_snapshot[] needs
an extern declaration in asm/ptrace_64.h.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:19:22 -07:00
David S. Miller
4845afac95 sparc64: Add __arch64__ to CHECKFLAGS
Otherwise sparse doesn't work.  The 32 vs. 64 header ifdef
used under arch/sparc/include/asm/ is:

#if defined(__sparc__) && defined(__arch64__)

And that doesn't work for sparse unless we give it __arch64__

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:14:52 -07:00
David S. Miller
87395fc678 sparc64: Kill hand-crafted I/O accessors in PCI controller drivers.
Use existing upa_{read,write}q() interfaces instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-10 23:14:46 -07:00
David S. Miller
e6e003720f sparc64: Commonize large portions of PSYCHO error handling.
The IOMMU and streaming cache error interrogation is moved here
as well as the PCI error interrupt handler.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-10 23:11:58 -07:00
David S. Miller
1c03a55cdf sparc64: Create and use psycho_pbm_init_common().
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-10 23:11:57 -07:00
David S. Miller
a21cff3e5e sparc64: Start commonizing code common between SABRE and PSYCHO.
These are very similar chips, in fact they are identical in some
macro blocks.

So start commonizing code which they can share.  We begin with
the IOMMU initialization sequence.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-10 23:11:56 -07:00
David S. Miller
22fecbae44 sparc64: Record OF device instead of device node pointer in pci_pbm_info.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-10 23:07:59 -07:00
David S. Miller
d3ae4b5bc7 sparc64: Get rid of pci_controller_info.
It is just used as a parent to encapsulate two PBM objects.

But that layout is only really relevant and necessary for
psycho PCI controllers, which unlike all the others share
a single IOMMU instance between sibling PCI busses.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-10 23:07:41 -07:00
David S. Miller
90158d84eb sparc64: Fix return value in update_persistent_clock().
Noticed by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-10 13:35:08 -07:00
David S. Miller
088a396236 sparc64: Add missing rtc_close() in update_persistent_clock()
Noticed by David Brownell.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-08 19:53:28 -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