Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] Fix sclp_vt220 error handling.
  [S390] cio: Reorganize initialization.
  [S390] cio: Make CIO_* macros safe if dbfs are not available.
  [S390] cio: Clean up messages.
  [S390] Fix IRQ tracing.
  [S390] vmur: fix diag14_read.
  [S390] Wire up sys_fallocate.
  [S390] add types.h include to s390_ext.h
  [S390] cio: Remove deprecated rdc/rcd.
  [S390] Get rid of new section mismatch warnings.
  [S390] sclp: kill unused SCLP config option.
  [S390] cio: Remove remains of _ccw_device_get_device_number().
  [S390] cio: css_sch_device_register() can be made static.
  [S390] Improve __smp_call_function_map.
  [S390] Convert to smp_call_function_single.
  • Loading branch information
Linus Torvalds committed Jul 29, 2007
2 parents 7b55737 + 5aaaf9f commit 9873aed
Show file tree
Hide file tree
Showing 34 changed files with 236 additions and 463 deletions.
16 changes: 0 additions & 16 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,22 +211,6 @@ Who: Richard Purdie <rpurdie@rpsys.net>

---------------------------

What: read_dev_chars(), read_conf_data{,_lpm}() (s390 common I/O layer)
When: December 2007
Why: These functions are a leftover from 2.4 times. They have several
problems:
- Duplication of checks that are done in the device driver's
interrupt handler
- common I/O layer can't do device specific error recovery
- device driver can't be notified for conditions happening during
execution of the function
Device drivers should issue the read device characteristics and read
configuration data ccws and do the appropriate error handling
themselves.
Who: Cornelia Huck <cornelia.huck@de.ibm.com>

---------------------------

What: i2c-ixp2000, i2c-ixp4xx and scx200_i2c drivers
When: September 2007
Why: Obsolete. The new i2c-gpio driver replaces all hardware-specific
Expand Down
12 changes: 6 additions & 6 deletions arch/s390/appldata/appldata_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ int appldata_diag(char record_nr, u16 function, unsigned long buffer,
/*
* appldata_mod_vtimer_wrap()
*
* wrapper function for mod_virt_timer(), because smp_call_function_on()
* wrapper function for mod_virt_timer(), because smp_call_function_single()
* accepts only one parameter.
*/
static void __appldata_mod_vtimer_wrap(void *p) {
Expand Down Expand Up @@ -208,9 +208,9 @@ __appldata_vtimer_setup(int cmd)
num_online_cpus()) * TOD_MICRO;
for_each_online_cpu(i) {
per_cpu(appldata_timer, i).expires = per_cpu_interval;
smp_call_function_on(add_virt_timer_periodic,
&per_cpu(appldata_timer, i),
0, 1, i);
smp_call_function_single(i, add_virt_timer_periodic,
&per_cpu(appldata_timer, i),
0, 1);
}
appldata_timer_active = 1;
P_INFO("Monitoring timer started.\n");
Expand All @@ -236,8 +236,8 @@ __appldata_vtimer_setup(int cmd)
} args;
args.timer = &per_cpu(appldata_timer, i);
args.expires = per_cpu_interval;
smp_call_function_on(__appldata_mod_vtimer_wrap,
&args, 0, 1, i);
smp_call_function_single(i, __appldata_mod_vtimer_wrap,
&args, 0, 1);
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions arch/s390/kernel/compat_wrapper.S
Original file line number Diff line number Diff line change
Expand Up @@ -1710,3 +1710,13 @@ compat_sys_timerfd_wrapper:
sys_eventfd_wrapper:
llgfr %r2,%r2 # unsigned int
jg sys_eventfd

.globl sys_fallocate_wrapper
sys_fallocate_wrapper:
lgfr %r2,%r2 # int
lgfr %r3,%r3 # int
sllg %r4,%r4,32 # get high word of 64bit loff_t
lr %r4,%r5 # get low word of 64bit loff_t
sllg %r5,%r6,32 # get high word of 64bit loff_t
l %r5,164(%r15) # get low word of 64bit loff_t
jg sys_fallocate
6 changes: 4 additions & 2 deletions arch/s390/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,11 @@ io_work_loop:
# _TIF_MCCK_PENDING is set, call handler
#
io_mcck_pending:
TRACE_IRQS_OFF
l %r1,BASED(.Ls390_handle_mcck)
la %r14,BASED(io_work_loop)
br %r1 # TIF bit will be cleared by handler
basr %r14,%r1 # TIF bit will be cleared by handler
TRACE_IRQS_ON
b BASED(io_work_loop)

#
# _TIF_NEED_RESCHED is set, call schedule
Expand Down
6 changes: 4 additions & 2 deletions arch/s390/kernel/entry64.S
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,10 @@ io_work_loop:
# _TIF_MCCK_PENDING is set, call handler
#
io_mcck_pending:
larl %r14,io_work_loop
jg s390_handle_mcck # TIF bit will be cleared by handler
TRACE_IRQS_OFF
brasl %r14,s390_handle_mcck # TIF bit will be cleared by handler
TRACE_IRQS_ON
j io_work_loop

#
# _TIF_NEED_RESCHED is set, call schedule
Expand Down
1 change: 1 addition & 0 deletions arch/s390/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#define ARCH_OFFSET 0
#endif

.section ".text.head","ax"
#ifndef CONFIG_IPL
.org 0
.long 0x00080000,0x80000000+startup # Just a restart PSW
Expand Down
30 changes: 13 additions & 17 deletions arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static void __smp_call_function_map(void (*func) (void *info), void *info,
if (wait)
data.finished = CPU_MASK_NONE;

spin_lock_bh(&call_lock);
spin_lock(&call_lock);
call_data = &data;

for_each_cpu_mask(cpu, map)
Expand All @@ -129,18 +129,16 @@ static void __smp_call_function_map(void (*func) (void *info), void *info,
/* Wait for response */
while (!cpus_equal(map, data.started))
cpu_relax();

if (wait)
while (!cpus_equal(map, data.finished))
cpu_relax();

spin_unlock_bh(&call_lock);

spin_unlock(&call_lock);
out:
local_irq_disable();
if (local)
if (local) {
local_irq_disable();
func(info);
local_irq_enable();
local_irq_enable();
}
}

/*
Expand Down Expand Up @@ -170,30 +168,28 @@ int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
EXPORT_SYMBOL(smp_call_function);

/*
* smp_call_function_on:
* smp_call_function_single:
* @cpu: the CPU where func should run
* @func: the function to run; this must be fast and non-blocking
* @info: an arbitrary pointer to pass to the function
* @nonatomic: unused
* @wait: if true, wait (atomically) until function has completed on other CPUs
* @cpu: the CPU where func should run
*
* Run a function on one processor.
*
* You must not call this function with disabled interrupts, from a
* hardware interrupt handler or from a bottom half.
*/
int smp_call_function_on(void (*func) (void *info), void *info, int nonatomic,
int wait, int cpu)
int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
int nonatomic, int wait)
{
cpumask_t map = CPU_MASK_NONE;

preempt_disable();
cpu_set(cpu, map);
__smp_call_function_map(func, info, nonatomic, wait, map);
__smp_call_function_map(func, info, nonatomic, wait,
cpumask_of_cpu(cpu));
preempt_enable();
return 0;
}
EXPORT_SYMBOL(smp_call_function_on);
EXPORT_SYMBOL(smp_call_function_single);

static void do_send_stop(void)
{
Expand Down
20 changes: 20 additions & 0 deletions arch/s390/kernel/sys_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,23 @@ s390_fadvise64_64(struct fadvise64_64_args __user *args)
return -EFAULT;
return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice);
}

#ifndef CONFIG_64BIT
/*
* This is a wrapper to call sys_fallocate(). For 31 bit s390 the last
* 64 bit argument "len" is split into the upper and lower 32 bits. The
* system call wrapper in the user space loads the value to %r6/%r7.
* The code in entry.S keeps the values in %r2 - %r6 where they are and
* stores %r7 to 96(%r15). But the standard C linkage requires that
* the whole 64 bit value for len is stored on the stack and doesn't
* use %r6 at all. So s390_fallocate has to convert the arguments from
* %r2: fd, %r3: mode, %r4/%r5: offset, %r6/96(%r15)-99(%r15): len
* to
* %r2: fd, %r3: mode, %r4/%r5: offset, 96(%r15)-103(%r15): len
*/
asmlinkage long s390_fallocate(int fd, int mode, loff_t offset,
u32 len_high, u32 len_low)
{
return sys_fallocate(fd, mode, offset, ((u64)len_high << 32) | len_low);
}
#endif
2 changes: 1 addition & 1 deletion arch/s390/kernel/syscalls.S
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ NI_SYSCALL /* 310 sys_move_pages */
SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper)
SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper)
SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper)
NI_SYSCALL /* 314 sys_fallocate */
SYSCALL(s390_fallocate,sys_fallocate,sys_fallocate_wrapper)
SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */
SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper)
SYSCALL(sys_timerfd,sys_timerfd,compat_sys_timerfd_wrapper)
Expand Down
1 change: 1 addition & 0 deletions arch/s390/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ SECTIONS
. = 0x00000000;
_text = .; /* Text and read-only data */
.text : {
*(.text.head)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/kernel/vtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ EXPORT_SYMBOL(add_virt_timer_periodic);

/*
* If we change a pending timer the function must be called on the CPU
* where the timer is running on, e.g. by smp_call_function_on()
* where the timer is running on, e.g. by smp_call_function_single()
*
* The original mod_timer adds the timer if it is not pending. For compatibility
* we do the same. The timer will be added on the current CPU as a oneshot timer.
Expand Down
6 changes: 3 additions & 3 deletions arch/s390/mm/vmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ struct memory_segment {

static LIST_HEAD(mem_segs);

void memmap_init(unsigned long size, int nid, unsigned long zone,
unsigned long start_pfn)
void __meminit memmap_init(unsigned long size, int nid, unsigned long zone,
unsigned long start_pfn)
{
struct page *start, *end;
struct page *map_start, *map_end;
Expand Down Expand Up @@ -66,7 +66,7 @@ void memmap_init(unsigned long size, int nid, unsigned long zone,
}
}

static inline void *vmem_alloc_pages(unsigned int order)
static void __init_refok *vmem_alloc_pages(unsigned int order)
{
if (slab_is_available())
return (void *)__get_free_pages(GFP_KERNEL, order);
Expand Down
12 changes: 3 additions & 9 deletions drivers/s390/char/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,9 @@ config CCW_CONSOLE
depends on TN3215_CONSOLE || TN3270_CONSOLE
default y

config SCLP
bool "Support for SCLP"
depends on S390
help
Include support for the SCLP interface to the service element.

config SCLP_TTY
bool "Support for SCLP line mode terminal"
depends on SCLP
depends on S390
help
Include support for IBM SCLP line-mode terminals.

Expand All @@ -65,7 +59,7 @@ config SCLP_CONSOLE

config SCLP_VT220_TTY
bool "Support for SCLP VT220-compatible terminal"
depends on SCLP
depends on S390
help
Include support for an IBM SCLP VT220-compatible terminal.

Expand All @@ -78,7 +72,7 @@ config SCLP_VT220_CONSOLE

config SCLP_CPI
tristate "Control-Program Identification"
depends on SCLP
depends on S390
help
This option enables the hardware console interface for system
identification. This is commonly used for workload management and
Expand Down
6 changes: 2 additions & 4 deletions drivers/s390/char/raw3270.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ raw3270_request_alloc(size_t size)
* Allocate a new 3270 ccw request from bootmem. Only works very
* early in the boot process. Only con3270.c should be using this.
*/
struct raw3270_request *
raw3270_request_alloc_bootmem(size_t size)
struct raw3270_request __init *raw3270_request_alloc_bootmem(size_t size)
{
struct raw3270_request *rq;

Expand Down Expand Up @@ -848,8 +847,7 @@ raw3270_setup_device(struct ccw_device *cdev, struct raw3270 *rp, char *ascebc)
/*
* Setup 3270 device configured as console.
*/
struct raw3270 *
raw3270_setup_console(struct ccw_device *cdev)
struct raw3270 __init *raw3270_setup_console(struct ccw_device *cdev)
{
struct raw3270 *rp;
char *ascebc;
Expand Down
Loading

0 comments on commit 9873aed

Please sign in to comment.