The following patch defines sigcontext ABI of ColdFire. Due to ISA
restrictions ColdFire needs different rt_sigreturn trampoline.
And due to ColdFire FP registers being 8-bytes instead of 12-bytes on
m68k, sigcontext and fpregset structures should be updated.
Regarding the sc_fpstate[16+6*8] field, it would've been enough 16
bytes to store ColdFire's FP state. To accomodate GLIBC's libSegFault
it would'be been enough 6*8 bytes (room for the 6 non-call-clobbered
FP registers). I set it to 16+6*8 to provide some extra space for any
future changes in the ColdFire FPU.
Signed-off-by: Maxim Kuvyrkov <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
This patch adds several syscalls, that provide necessary
functionality to support NPTL on m68k/ColdFire.
The syscalls are get_thread_area, set_thread_area, atomic_cmpxchg_32 and
atomic_barrier.
The cmpxchg syscall is required for ColdFire as it doesn't support 'cas'
instruction.
Also a ptrace call PTRACE_GET_THREAD_AREA is added to allow debugger to
inspect the TLS storage.
Signed-off-by: Maxim Kuvyrkov <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
This patch switches m68k to generic siginfo layout. The custom layout
of m68k's `struct siginfo' had several issues due to not considering
aliasing of members in the union, e.g., _uid32 was at different offsets
in ._kill, ._rt and ._sigchld.
Signed-off-by: Maxim Kuvyrkov <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Lots of changes. Remove volatile keywords. Take the advice in the comments
and change video_slot to slot_addr. Factor out fifteen or so "channel >>
8" shifts into three shifts higher up the call graph. Make
csc_setpalette() atomic, pass the correct color values. Check for
ioremap() failure. Add missing break statement, thus fixing 24 bit console
visual (blue background bug). Remove some uninformative printk() noise.
Add a description for powerbook 140/170 graphics.
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Add the missing mac video modes for the Portrait and 12" RGB displays. The
specs come from the Mac LC III developer note.
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
The valkyriefb driver needs the CUDA to work in order to set the video
mode at boot. So initialise the device earlier, and bring the m68k code
closer to the powermac code.
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Valkyriefb and macfb will adopt the same card if they get the chance, so
remove valkyrie support from macfb. Also fix the "valkyriefb: can't do
832x624x8" problem reported by Raylynn Knight some time ago, by adding
vmode 13 support for CONFIG_MAC. Also add vmode 11 since that works too.
Make use of the monitor sense lines on 68k Macs too. Also some cleanups.
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
The valkyriefb driver assumes that this logic holds:
mac_vmode_to_var(X, cmode, &var);
mac_var_to_vmode(&var, &vmode, &cmode);
assert(vmode == X);
But it doesn't hold because mac_var_to_vmode() can return a mode with a
slower pixel clock, even when a match is available. So we end up with this
failure:
using video mode 11 and color mode 0.
valkyriefb: vmode 12 not valid.
valkyriefb: can't set default video mode
valkyriefb: vmode 12 not valid.
Rather than have mac_var_to_mode() return the first reasonable mode it
finds, have it return the mode that is closest to the requested one (or
the mode with the closest longer pixel clock period if there is no exact
match).
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Move platform device code from the drivers to the platform init function.
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Move platform device code from the driver to the platform init function.
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Remove the old 68k Mac serial port code and a lot of related cruft. Add
new SCC platform devices to mac 68k platform.
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Add platform driver support to the pmac-zilog driver, for m68k macs.
Place the powermac-specific code inside #ifdef CONFIG_PPC_PMAC.
Signed-off-by: Finn Thain <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Adjust the platform device code to conform with the code style used in the
rest of this patch series. No need to name resources nor to register
devices which are not applicable.
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Cleanup whitespace and comments. Remove some dead code.
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@haskernel@
@@
@depends on haskernel@
expression x,__divisor;
@@
- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Trivial patch which adds the __init macro to the module_init
function and all of its helper functions of drivers/char/vme_scc.c
Signed-off-by: Peter Huewe <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Remove the comments referring to a function map_chunk that no longer exists.
Signed-off-by: Philippe De Muyter <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
The test in __ioremap to reject memory ranges crossing the 0 boundary
rejects also memory ranges ending at the end of the memory. Fix that.
Signed-off-by: Philippe De Muyter <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
The GT-64111 PCI host bridge has no address translation mechanism, so
it can't generate legacy port accesses. This quirk fixes legacy device
port resources to contain the bus addresses actually generated by the
GT-64111.
I think this is the approach Ben Herrenschmidt suggested long ago:
http://marc.info/?l=linux-kernel&m=119733290624544&w=2
This allows us to remove the IORESOURCE_PCI_FIXED hack from
pcibios_fixup_device_resources(), which converts bus addresses to CPU
addresses. IORESOURCE_PCI_FIXED denotes resources that can't be moved;
it has nothing to do with converting bus to CPU addresses.
Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Yoichi Yuasa <[email protected]>
Cc: Thomas Bogendoerfer <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: [email protected]
Tested-by: Yoichi Yuasa <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/998/
Signed-off-by: Ralf Baechle <[email protected]>
On Alchemy the PCMCIA area lies at the end of the chips 36bit system bus
area. Currently, addresses at the far end of the 32bit area are assumed
to belong to the PCMCIA area and fixed up to the real 36bit address before
being passed to ioremap().
A previous commit enabled 64 bit physical size for the resource datatype on
Alchemy and this allows to use the correct 36bit addresses when registering
the PCMCIA sockets.
This patch removes the 32-to-36bit address fixup and registers the Alchemy
demo board pcmcia socket with the correct 36bit physical addresses.
Tested on DB1200, with a CF card (ide-cs driver) and a 3c589 PCMCIA ethernet
card.
Signed-off-by: Manuel Lauss <[email protected]>
To: Linux-MIPS <[email protected]>
Cc: Manuel Lauss <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/994/
Signed-off-by: Ralf Baechle <[email protected]>
Because the VIA SuperIO chip only decodes 24 bits of address space but port
address space currently being configured as 32MB there is the theoretical
possibility of aliases within the I/O port address range.
The complicated solution is to reserve all address range that potencially
could cause such aliases. But with the PCI spec limiting port allocations
for devices to a maximum of 256 bytes 16MB of port address space already is
way more than one would ever expect to be used so we just reduce the port
space to 16MB.
Signed-off-by: Ralf Baechle <[email protected]>
To: Yoichi Yuasa <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: [email protected]
Cc: Benjamin Herrenschmidt <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/995/
This is just a test program for raw_spinlocks. The main reason I
wrote it is to validate my spinlock changes that I sent in a previous
patch.
To use it enable CONFIG_DEBUG_FS and CONFIG_SPINLOCK_TEST then at run
time do:
# mount -t debugfs none /sys/kernel/debug/
# cat /sys/kernel/debug/mips/spin_single
# cat /sys/kernel/debug/mips/spin_multi
On my 600MHz octeon cn5860 (16 CPUs) I get
spin_single spin_multi
base 106885 247941
spinlock_patch 75194 219465
This shows that for uncontended locks the spinlock patch gives 41%
improvement and for contended locks 12% improvement (1/time).
Signed-off-by: David Daney <[email protected]>
To: [email protected]
Patchwork: http://patchwork.linux-mips.org/patch/969/
Signed-off-by: Ralf Baechle <[email protected]>
The current locking mechanism uses a ll/sc sequence to release a
spinlock. This is slower than a wmb() followed by a store to unlock.
The branching forward to .subsection 2 on sc failure slows down the
contended case. So we get rid of that part too.
Since we are now working on naturally aligned u16 values, we can get
rid of a masking operation as the LHU already does the right thing.
The ANDI are reversed for better scheduling on multi-issue CPUs
On a 12 CPU 750MHz Octeon cn5750 this patch improves ipv4 UDP packet
forwarding rates from 3.58*10^6 PPS to 3.99*10^6 PPS, or about 11%.
Signed-off-by: David Daney <[email protected]>
To: [email protected]
Patchwork: http://patchwork.linux-mips.org/patch/937/
Signed-off-by: Ralf Baechle <[email protected]>
Change to different macros for assembler macros since the old names in
powertv_setup.c were co-opted for use in asm/asm.h. This broken the
build for the powertv platform. This patch introduces new macros based on
the new macros in asm.h to take the place of the old macro values.
Signed-off-by: David VomLehn <[email protected]>
Cc: [email protected]
Patchwork: http://patchwork.linux-mips.org/patch/985/
Signed-off-by: Ralf Baechle <[email protected]>
The sole user is au1xxx_calc_clock() which is only used in early bootup
where the is no paralellism thus no race condition to protect against.
Signed-off-by: Ralf Baechle <[email protected]>
Cc: Manuel Lauss <[email protected]>