Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/geert/linux-m68k

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (24 commits)
  m68k: Define sigcontext ABI of ColdFire
  m68knommu: NPTL support for uClinux
  m68k: Add NPTL support
  m68k: Eliminate unused variable in page_to_phys()
  m68k: Switch to generic siginfo layout
  macfb: fix 24-bit visual and stuff
  macfb: cleanup
  fbdev: add some missing mac modes
  mac68k: start CUDA early
  valkyriefb: various fixes
  fbdev: mac_var_to_mode() fix
  mac68k: move macsonic and macmace platform devices
  mac68k: move mac_esp platform device
  mac68k: replace mac68k SCC code with platform device
  pmac-zilog: add platform driver
  pmac-zilog: cleanup
  mac68k: rework SWIM platform device
  mac68k: cleanup
  ataflop: Killl warning about unused variable flags
  m68k: Use DIV_ROUND_CLOSEST
  ...
  • Loading branch information
torvalds committed Feb 28, 2010
2 parents 7981164 + 00ebfe5 commit 847f9c6
Show file tree
Hide file tree
Showing 48 changed files with 1,111 additions and 1,436 deletions.
4 changes: 2 additions & 2 deletions arch/h8300/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ void cache_push_v (unsigned long vaddr, int len)
{
}

/* Map some physical address range into the kernel address space. The
* code is copied and adapted from map_chunk().
/*
* Map some physical address range into the kernel address space.
*/

unsigned long kernel_map(unsigned long paddr, unsigned long size,
Expand Down
6 changes: 1 addition & 5 deletions arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,6 @@ config GVPIOEXT_PLIP
Say Y to enable doing IP over the parallel port on your GVP
IO-Extender card, N otherwise.

config MAC_SCC
tristate "Macintosh serial support"
depends on MAC

config MAC_HID
bool
depends on INPUT_ADBHID
Expand Down Expand Up @@ -595,7 +591,7 @@ config DN_SERIAL

config SERIAL_CONSOLE
bool "Support for serial port console"
depends on (AMIGA || ATARI || MAC || SUN3 || SUN3X || VME || APOLLO) && (ATARI_MFPSER=y || ATARI_MIDI=y || MAC_SCC=y || AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y || SERIAL=y || MVME147_SCC || SERIAL167 || MVME162_SCC || BVME6000_SCC || DN_SERIAL)
depends on (AMIGA || ATARI || SUN3 || SUN3X || VME || APOLLO) && (ATARI_MFPSER=y || ATARI_MIDI=y || AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y || SERIAL=y || MVME147_SCC || SERIAL167 || MVME162_SCC || BVME6000_SCC || DN_SERIAL)
---help---
If you say Y here, it will be possible to use a serial port as the
system console (the system console is the device which receives all
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/amiga/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ static void __init amiga_sched_init(irq_handler_t timer_routine)
static struct resource sched_res = {
.name = "timer", .start = 0x00bfd400, .end = 0x00bfd5ff,
};
jiffy_ticks = (amiga_eclock+HZ/2)/HZ;
jiffy_ticks = DIV_ROUND_CLOSEST(amiga_eclock, HZ);

if (request_resource(&mb_resources._ciab, &sched_res))
printk("Cannot allocate ciab.ta{lo,hi}\n");
Expand Down
7 changes: 5 additions & 2 deletions arch/m68k/configs/mac_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,11 @@ CONFIG_VT_HW_CONSOLE_BINDING=y
#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_PMACZILOG=y
CONFIG_SERIAL_PMACZILOG_TTYS=y
CONFIG_SERIAL_PMACZILOG_CONSOLE=y
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
CONFIG_LEGACY_PTYS=y
Expand Down Expand Up @@ -834,9 +839,7 @@ CONFIG_HIDRAW=y
#
# Character devices
#
CONFIG_MAC_SCC=y
CONFIG_MAC_HID=y
CONFIG_SERIAL_CONSOLE=y

#
# File systems
Expand Down
6 changes: 5 additions & 1 deletion arch/m68k/configs/multi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,11 @@ CONFIG_A2232=y
#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_PMACZILOG=y
CONFIG_SERIAL_PMACZILOG_TTYS=y
CONFIG_SERIAL_PMACZILOG_CONSOLE=y
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
CONFIG_LEGACY_PTYS=y
Expand Down Expand Up @@ -982,7 +987,6 @@ CONFIG_ATARI_MIDI=y
CONFIG_ATARI_DSP56K=m
CONFIG_AMIGA_BUILTIN_SERIAL=y
CONFIG_MULTIFACE_III_TTY=m
CONFIG_MAC_SCC=y
CONFIG_MAC_HID=y
CONFIG_MVME147_SCC=y
CONFIG_SERIAL167=y
Expand Down
25 changes: 0 additions & 25 deletions arch/m68k/include/asm/machw.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,4 @@
#define VIDEOMEMSIZE (4096*1024)
#define VIDEOMEMMASK (-4096*1024)

#ifndef __ASSEMBLY__

#include <linux/types.h>

#if 0
/*
** SCC Z8530
*/

#define MAC_SCC_BAS (0x50F04000)
struct MAC_SCC
{
u_char cha_a_ctrl;
u_char char_dummy1;
u_char cha_a_data;
u_char char_dummy2;
u_char cha_b_ctrl;
u_char char_dummy3;
u_char cha_b_data;
};
# define mac_scc ((*(volatile struct SCC*)MAC_SCC_BAS))
#endif

#endif /* __ASSEMBLY__ */

#endif /* linux/machw.h */
22 changes: 5 additions & 17 deletions arch/m68k/include/asm/macints.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

#define VIA1_SOURCE_BASE 8
#define VIA2_SOURCE_BASE 16
#define MAC_SCC_SOURCE_BASE 24
#define PSC3_SOURCE_BASE 24
#define PSC4_SOURCE_BASE 32
#define PSC5_SOURCE_BASE 40
Expand Down Expand Up @@ -96,26 +95,12 @@
#define IRQ_PSC3_2 (26)
#define IRQ_PSC3_3 (27)

/* Level 4 (SCC) interrupts */
#define IRQ_SCC (32)
#define IRQ_SCCA (33)
#define IRQ_SCCB (34)
#if 0 /* FIXME: are there multiple interrupt conditions on the SCC ?? */
/* SCC interrupts */
#define IRQ_SCCB_TX (32)
#define IRQ_SCCB_STAT (33)
#define IRQ_SCCB_RX (34)
#define IRQ_SCCB_SPCOND (35)
#define IRQ_SCCA_TX (36)
#define IRQ_SCCA_STAT (37)
#define IRQ_SCCA_RX (38)
#define IRQ_SCCA_SPCOND (39)
#endif

/* Level 4 (PSC, AV Macs only) interrupts */
#define IRQ_PSC4_0 (32)
#define IRQ_PSC4_1 (33)
#define IRQ_MAC_SCC_A IRQ_PSC4_1
#define IRQ_PSC4_2 (34)
#define IRQ_MAC_SCC_B IRQ_PSC4_2
#define IRQ_PSC4_3 (35)
#define IRQ_MAC_MACE_DMA IRQ_PSC4_3

Expand Down Expand Up @@ -146,6 +131,9 @@
#define IRQ_BABOON_2 (66)
#define IRQ_BABOON_3 (67)

/* On non-PSC machines, the serial ports share an IRQ */
#define IRQ_MAC_SCC IRQ_AUTO_4

#define SLOT2IRQ(x) (x + 47)
#define IRQ2SLOT(x) (x - 47)

Expand Down
2 changes: 2 additions & 0 deletions arch/m68k/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ struct switch_stack {
#define PTRACE_GETFPREGS 14
#define PTRACE_SETFPREGS 15

#define PTRACE_GET_THREAD_AREA 25

#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */

#ifdef __KERNEL__
Expand Down
6 changes: 6 additions & 0 deletions arch/m68k/include/asm/sigcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ struct sigcontext {
unsigned long sc_pc;
unsigned short sc_formatvec;
#ifndef __uClinux__
# ifdef __mcoldfire__
unsigned long sc_fpregs[2][2]; /* room for two fp registers */
unsigned long sc_fpcntl[3];
unsigned char sc_fpstate[16+6*8];
# else
unsigned long sc_fpregs[2*3]; /* room for two fp registers */
unsigned long sc_fpcntl[3];
unsigned char sc_fpstate[216];
# endif
#endif
};

Expand Down
91 changes: 0 additions & 91 deletions arch/m68k/include/asm/siginfo.h
Original file line number Diff line number Diff line change
@@ -1,97 +1,6 @@
#ifndef _M68K_SIGINFO_H
#define _M68K_SIGINFO_H

#ifndef __uClinux__
#define HAVE_ARCH_SIGINFO_T
#define HAVE_ARCH_COPY_SIGINFO
#endif

#include <asm-generic/siginfo.h>

#ifndef __uClinux__

typedef struct siginfo {
int si_signo;
int si_errno;
int si_code;

union {
int _pad[SI_PAD_SIZE];

/* kill() */
struct {
__kernel_pid_t _pid; /* sender's pid */
__kernel_uid_t _uid; /* backwards compatibility */
__kernel_uid32_t _uid32; /* sender's uid */
} _kill;

/* POSIX.1b timers */
struct {
timer_t _tid; /* timer id */
int _overrun; /* overrun count */
char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
sigval_t _sigval; /* same as below */
int _sys_private; /* not to be passed to user */
} _timer;

/* POSIX.1b signals */
struct {
__kernel_pid_t _pid; /* sender's pid */
__kernel_uid_t _uid; /* backwards compatibility */
sigval_t _sigval;
__kernel_uid32_t _uid32; /* sender's uid */
} _rt;

/* SIGCHLD */
struct {
__kernel_pid_t _pid; /* which child */
__kernel_uid_t _uid; /* backwards compatibility */
int _status; /* exit code */
clock_t _utime;
clock_t _stime;
__kernel_uid32_t _uid32; /* sender's uid */
} _sigchld;

/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
struct {
void *_addr; /* faulting insn/memory ref. */
} _sigfault;

/* SIGPOLL */
struct {
int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
int _fd;
} _sigpoll;
} _sifields;
} siginfo_t;

#define UID16_SIGINFO_COMPAT_NEEDED

/*
* How these fields are to be accessed.
*/
#undef si_uid
#ifdef __KERNEL__
#define si_uid _sifields._kill._uid32
#define si_uid16 _sifields._kill._uid
#else
#define si_uid _sifields._kill._uid
#endif

#ifdef __KERNEL__

#include <linux/string.h>

static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
{
if (from->si_code < 0)
memcpy(to, from, sizeof(*to));
else
/* _sigchld is currently the largest know union member */
memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
}

#endif /* __KERNEL__ */
#endif /* !__uClinux__ */

#endif
2 changes: 1 addition & 1 deletion arch/m68k/include/asm/swab.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
}

#define __arch_swab32 __arch_swab32
#elif !defined(__uClinux__)
#elif !defined(__mcoldfire__)

static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
{
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/include/asm/thread_info_mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ struct thread_info {
struct exec_domain *exec_domain; /* execution domain */
int preempt_count; /* 0 => preemptable, <0 => BUG */
__u32 cpu; /* should always be 0 on m68k */
unsigned long tp_value; /* thread pointer */
struct restart_block restart_block;
};
#endif /* __ASSEMBLY__ */
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/include/asm/thread_info_no.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ struct thread_info {
unsigned long flags; /* low level flags */
int cpu; /* cpu we're on */
int preempt_count; /* 0 => preemptable, <0 => BUG */
unsigned long tp_value; /* thread pointer */
struct restart_block restart_block;
};

Expand Down
4 changes: 4 additions & 0 deletions arch/m68k/include/asm/ucontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ typedef greg_t gregset_t[NGREG];

typedef struct fpregset {
int f_fpcntl[3];
#ifdef __mcoldfire__
int f_fpregs[8][2];
#else
int f_fpregs[8*3];
#endif
} fpregset_t;

struct mcontext {
Expand Down
6 changes: 5 additions & 1 deletion arch/m68k/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,14 @@
#define __NR_pwritev 330
#define __NR_rt_tgsigqueueinfo 331
#define __NR_perf_event_open 332
#define __NR_get_thread_area 333
#define __NR_set_thread_area 334
#define __NR_atomic_cmpxchg_32 335
#define __NR_atomic_barrier 336

#ifdef __KERNEL__

#define NR_syscalls 333
#define NR_syscalls 337

#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
Expand Down
7 changes: 1 addition & 6 deletions arch/m68k/include/asm/virtconvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ static inline void *phys_to_virt(unsigned long address)
#define page_to_phys(page) \
__pa(PAGE_OFFSET + (((page) - pg_data_map[0].node_mem_map) << PAGE_SHIFT))
#else
#define page_to_phys(_page) ({ \
struct page *__page = _page; \
struct pglist_data *pgdat; \
pgdat = pg_data_table[page_to_nid(__page)]; \
page_to_pfn(__page) << PAGE_SHIFT; \
})
#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
#endif
#else
#define page_to_phys(page) (((page) - mem_map) << PAGE_SHIFT)
Expand Down
4 changes: 4 additions & 0 deletions arch/m68k/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -761,4 +761,8 @@ sys_call_table:
.long sys_pwritev /* 330 */
.long sys_rt_tgsigqueueinfo
.long sys_perf_event_open
.long sys_get_thread_area
.long sys_set_thread_area
.long sys_atomic_cmpxchg_32 /* 335 */
.long sys_atomic_barrier

4 changes: 4 additions & 0 deletions arch/m68k/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,

p->thread.usp = usp;
p->thread.ksp = (unsigned long)childstack;

if (clone_flags & CLONE_SETTLS)
task_thread_info(p)->tp_value = regs->d5;

/*
* Must save the current SFC/DFC value, NOT the value when
* the parent was last descheduled - RGH 10-08-96
Expand Down
5 changes: 5 additions & 0 deletions arch/m68k/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
ret = -EFAULT;
break;

case PTRACE_GET_THREAD_AREA:
ret = put_user(task_thread_info(child)->tp_value,
(unsigned long __user *)data);
break;

default:
ret = ptrace_request(child, request, addr, data);
break;
Expand Down
7 changes: 7 additions & 0 deletions arch/m68k/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,10 +897,17 @@ static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,

/* Set up to return from userspace. */
err |= __put_user(frame->retcode, &frame->pretcode);
#ifdef __mcoldfire__
/* movel #__NR_rt_sigreturn,d0; trap #0 */
err |= __put_user(0x203c0000, (long __user *)(frame->retcode + 0));
err |= __put_user(0x00004e40 + (__NR_rt_sigreturn << 16),
(long __user *)(frame->retcode + 4));
#else
/* moveq #,d0; notb d0; trap #0 */
err |= __put_user(0x70004600 + ((__NR_rt_sigreturn ^ 0xff) << 16),
(long __user *)(frame->retcode + 0));
err |= __put_user(0x4e40, (short __user *)(frame->retcode + 4));
#endif

if (err)
goto give_sigsegv;
Expand Down
Loading

0 comments on commit 847f9c6

Please sign in to comment.