Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ccfd5ea authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull first batch of s390 updates from Martin Schwidefsky:
 "The most interesting change is that Martin converted s390 to generic
  hardirqs.  Which means that all current architectures have been
  converted and that CONFIG_GENERIC_HARDIRQS can be removed.  Martin
  prepared a patch for that already (see genirq branch), but the best
  time to merge that is probably at the end of the merge window / begin
  of -rc1.

  Another patch converts s390 to software referenced bits instead of
  relying on the reference bit in the storage key.  Therefore s390
  doesn't use storage keys anymore, except for kvm.

  Besides that we have improvements, cleanups and fixes in PCI, DASD and
  all over the place."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (32 commits)
  s390/pci: use virtual memory for iommu bitmap
  s390/cio: fix unlocked access of global bitmap
  s390/pci: update function handle after resume from hibernate
  s390/pci: try harder to modify a function
  s390/pci: split lpf
  s390/hibernate: add early resume function
  s390/pci: add recover sysfs knob
  s390/pci: use claim_resource
  s390/pci/hotplug: convert to be builtin only
  s390/mm: implement software referenced bits
  s390/dasd: fix statistics for recovered requests
  s390/tx: allow program interruption filtering in user space
  s390/pgtable: fix mprotect for single-threaded KVM guests
  s390/time: return with irqs disabled from psw_idle
  s390/kprobes: add support for compare and branch instructions
  s390/switch_to: fix save_access_regs() / restore_access_regs()
  s390/bitops: fix inline assembly constraints
  s390/dasd: enable raw_track_access reads without direct I/O
  s390/mm: introduce ptep_flush_lazy helper
  s390/time: clock comparator revalidation
  ...
parents ea98af13 22459321
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ config S390
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_FUNCTION_TRACER
	select HAVE_FUNCTION_TRACE_MCOUNT_TEST
	select HAVE_GENERIC_HARDIRQS
	select HAVE_KERNEL_BZIP2
	select HAVE_KERNEL_GZIP
	select HAVE_KERNEL_LZ4
@@ -445,6 +446,16 @@ config PCI_NR_FUNCTIONS
	  This allows you to specify the maximum number of PCI functions which
	  this kernel will support.

config PCI_NR_MSI
	int "Maximum number of MSI interrupts (64-32768)"
	range 64 32768
	default "256"
	help
	  This defines the number of virtual interrupts the kernel will
	  provide for MSI interrupts. If you configure your system to have
	  too few drivers will fail to allocate MSI interrupts for all
	  PCI devices.

source "drivers/pci/Kconfig"
source "drivers/pci/pcie/Kconfig"
source "drivers/pci/hotplug/Kconfig"
+67 −0
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@
#ifndef _ASM_S390_AIRQ_H
#define _ASM_S390_AIRQ_H

#include <linux/bit_spinlock.h>

struct airq_struct {
	struct hlist_node list;		/* Handler queueing. */
	void (*handler)(struct airq_struct *);	/* Thin-interrupt handler */
@@ -23,4 +25,69 @@ struct airq_struct {
int register_adapter_interrupt(struct airq_struct *airq);
void unregister_adapter_interrupt(struct airq_struct *airq);

/* Adapter interrupt bit vector */
struct airq_iv {
	unsigned long *vector;	/* Adapter interrupt bit vector */
	unsigned long *avail;	/* Allocation bit mask for the bit vector */
	unsigned long *bitlock;	/* Lock bit mask for the bit vector */
	unsigned long *ptr;	/* Pointer associated with each bit */
	unsigned int *data;	/* 32 bit value associated with each bit */
	unsigned long bits;	/* Number of bits in the vector */
	unsigned long end;	/* Number of highest allocated bit + 1 */
	spinlock_t lock;	/* Lock to protect alloc & free */
};

#define AIRQ_IV_ALLOC	1	/* Use an allocation bit mask */
#define AIRQ_IV_BITLOCK	2	/* Allocate the lock bit mask */
#define AIRQ_IV_PTR	4	/* Allocate the ptr array */
#define AIRQ_IV_DATA	8	/* Allocate the data array */

struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags);
void airq_iv_release(struct airq_iv *iv);
unsigned long airq_iv_alloc_bit(struct airq_iv *iv);
void airq_iv_free_bit(struct airq_iv *iv, unsigned long bit);
unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start,
			   unsigned long end);

static inline unsigned long airq_iv_end(struct airq_iv *iv)
{
	return iv->end;
}

static inline void airq_iv_lock(struct airq_iv *iv, unsigned long bit)
{
	const unsigned long be_to_le = BITS_PER_LONG - 1;
	bit_spin_lock(bit ^ be_to_le, iv->bitlock);
}

static inline void airq_iv_unlock(struct airq_iv *iv, unsigned long bit)
{
	const unsigned long be_to_le = BITS_PER_LONG - 1;
	bit_spin_unlock(bit ^ be_to_le, iv->bitlock);
}

static inline void airq_iv_set_data(struct airq_iv *iv, unsigned long bit,
				    unsigned int data)
{
	iv->data[bit] = data;
}

static inline unsigned int airq_iv_get_data(struct airq_iv *iv,
					    unsigned long bit)
{
	return iv->data[bit];
}

static inline void airq_iv_set_ptr(struct airq_iv *iv, unsigned long bit,
				   unsigned long ptr)
{
	iv->ptr[bit] = ptr;
}

static inline unsigned long airq_iv_get_ptr(struct airq_iv *iv,
					    unsigned long bit)
{
	return iv->ptr[bit];
}

#endif /* _ASM_S390_AIRQ_H */
+6 −6
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ static inline void __set_bit(unsigned long nr, volatile unsigned long *ptr)
	addr = (unsigned long) ptr + ((nr ^ (BITS_PER_LONG - 8)) >> 3);
	asm volatile(
		"	oc	%O0(1,%R0),%1"
		: "=Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7]) : "cc" );
		: "+Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7]) : "cc");
}

static inline void 
@@ -244,7 +244,7 @@ __clear_bit(unsigned long nr, volatile unsigned long *ptr)
	addr = (unsigned long) ptr + ((nr ^ (BITS_PER_LONG - 8)) >> 3);
	asm volatile(
		"	nc	%O0(1,%R0),%1"
		: "=Q" (*(char *) addr) : "Q" (_ni_bitmap[nr & 7]) : "cc" );
		: "+Q" (*(char *) addr) : "Q" (_ni_bitmap[nr & 7]) : "cc");
}

static inline void 
@@ -271,7 +271,7 @@ static inline void __change_bit(unsigned long nr, volatile unsigned long *ptr)
	addr = (unsigned long) ptr + ((nr ^ (BITS_PER_LONG - 8)) >> 3);
	asm volatile(
		"	xc	%O0(1,%R0),%1"
		: "=Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7]) : "cc" );
		: "+Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7]) : "cc");
}

static inline void 
@@ -301,7 +301,7 @@ test_and_set_bit_simple(unsigned long nr, volatile unsigned long *ptr)
	ch = *(unsigned char *) addr;
	asm volatile(
		"	oc	%O0(1,%R0),%1"
		: "=Q" (*(char *) addr)	: "Q" (_oi_bitmap[nr & 7])
		: "+Q" (*(char *) addr)	: "Q" (_oi_bitmap[nr & 7])
		: "cc", "memory");
	return (ch >> (nr & 7)) & 1;
}
@@ -320,7 +320,7 @@ test_and_clear_bit_simple(unsigned long nr, volatile unsigned long *ptr)
	ch = *(unsigned char *) addr;
	asm volatile(
		"	nc	%O0(1,%R0),%1"
		: "=Q" (*(char *) addr)	: "Q" (_ni_bitmap[nr & 7])
		: "+Q" (*(char *) addr)	: "Q" (_ni_bitmap[nr & 7])
		: "cc", "memory");
	return (ch >> (nr & 7)) & 1;
}
@@ -339,7 +339,7 @@ test_and_change_bit_simple(unsigned long nr, volatile unsigned long *ptr)
	ch = *(unsigned char *) addr;
	asm volatile(
		"	xc	%O0(1,%R0),%1"
		: "=Q" (*(char *) addr)	: "Q" (_oi_bitmap[nr & 7])
		: "+Q" (*(char *) addr)	: "Q" (_oi_bitmap[nr & 7])
		: "cc", "memory");
	return (ch >> (nr & 7)) & 1;
}
+1 −0
Original line number Diff line number Diff line
@@ -296,6 +296,7 @@ static inline int ccw_dev_id_is_equal(struct ccw_dev_id *dev_id1,
	return 0;
}

void channel_subsystem_reinit(void);
extern void css_schedule_reprobe(void);

extern void reipl_ccw_dev(struct ccw_dev_id *id);
+5 −0
Original line number Diff line number Diff line
@@ -20,4 +20,9 @@

#define HARDIRQ_BITS	8

static inline void ack_bad_irq(unsigned int irq)
{
	printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
}

#endif /* __ASM_HARDIRQ_H */
Loading