Skip to content

Commit

Permalink
Merge branch 'from-linus' into upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
John W. Linville committed May 26, 2006
2 parents df8ccb9 + 705af30 commit f587fb7
Show file tree
Hide file tree
Showing 56 changed files with 389 additions and 177 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 17
EXTRAVERSION =-rc4
NAME=Sliding Snow Leopard
EXTRAVERSION =-rc5
NAME=Lordi Rules

# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
Expand Down
2 changes: 1 addition & 1 deletion arch/i386/power/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void __restore_processor_state(struct saved_context *ctxt)
write_cr4(ctxt->cr4);
write_cr3(ctxt->cr3);
write_cr2(ctxt->cr2);
write_cr2(ctxt->cr0);
write_cr0(ctxt->cr0);

/*
* now restore the descriptor tables to their proper values
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/systbl.S
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ SYSCALL(symlinkat)
SYSCALL(readlinkat)
SYSCALL(fchmodat)
SYSCALL(faccessat)
COMPAT_SYS(get_robust_list)
COMPAT_SYS(set_robust_list)

/*
* please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c
Expand Down
7 changes: 5 additions & 2 deletions arch/powerpc/platforms/cell/spu_callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ void *spu_syscall_table[] = {
[__NR_futex] sys_futex,
[__NR_sched_setaffinity] sys_sched_setaffinity,
[__NR_sched_getaffinity] sys_sched_getaffinity,
[224] sys_ni_syscall,
[__NR_tuxcall] sys_ni_syscall,
[226] sys_ni_syscall,
[__NR_io_setup] sys_io_setup,
Expand Down Expand Up @@ -332,19 +333,21 @@ void *spu_syscall_table[] = {
[__NR_readlinkat] sys_readlinkat,
[__NR_fchmodat] sys_fchmodat,
[__NR_faccessat] sys_faccessat,
[__NR_get_robust_list] sys_get_robust_list,
[__NR_set_robust_list] sys_set_robust_list,
};

long spu_sys_callback(struct spu_syscall_block *s)
{
long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6);

syscall = spu_syscall_table[s->nr_ret];

if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) {
pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret);
return -ENOSYS;
}

syscall = spu_syscall_table[s->nr_ret];

#ifdef DEBUG
print_symbol(KERN_DEBUG "SPU-syscall %s:", (unsigned long)syscall);
printk("syscall%ld(%lx, %lx, %lx, %lx, %lx, %lx)\n",
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static inline void stop_hz_timer(void)
next = next_timer_interrupt();
do {
seq = read_seqbegin_irqsave(&xtime_lock, flags);
timer = (__u64 next) - (__u64 jiffies) + jiffies_64;
timer = ((__u64) next) - ((__u64) jiffies) + jiffies_64;
} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
todval = -1ULL;
/* Be careful about overflows. */
Expand Down
4 changes: 2 additions & 2 deletions arch/sparc64/kernel/pci_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static inline void iommu_free_ctx(struct pci_iommu *iommu, int ctx)
* DMA for PCI device PDEV. Return non-NULL cpu-side address if
* successful and set *DMA_ADDRP to the PCI side dma address.
*/
static void *pci_4u_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp)
static void *pci_4u_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp, gfp_t gfp)
{
struct pcidev_cookie *pcp;
struct pci_iommu *iommu;
Expand All @@ -232,7 +232,7 @@ static void *pci_4u_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr
if (order >= 10)
return NULL;

first_page = __get_free_pages(GFP_ATOMIC, order);
first_page = __get_free_pages(gfp, order);
if (first_page == 0UL)
return NULL;
memset((char *)first_page, 0, PAGE_SIZE << order);
Expand Down
4 changes: 2 additions & 2 deletions arch/sparc64/kernel/pci_sun4v.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static void pci_arena_free(struct pci_iommu_arena *arena, unsigned long base, un
__clear_bit(i, arena->map);
}

static void *pci_4v_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp)
static void *pci_4v_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp, gfp_t gfp)
{
struct pcidev_cookie *pcp;
struct pci_iommu *iommu;
Expand All @@ -169,7 +169,7 @@ static void *pci_4v_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr

npages = size >> IO_PAGE_SHIFT;

first_page = __get_free_pages(GFP_ATOMIC, order);
first_page = __get_free_pages(gfp, order);
if (unlikely(first_page == 0UL))
return NULL;

Expand Down
7 changes: 6 additions & 1 deletion block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3452,7 +3452,12 @@ void end_that_request_last(struct request *req, int uptodate)
if (unlikely(laptop_mode) && blk_fs_request(req))
laptop_io_completion();

if (disk && blk_fs_request(req)) {
/*
* Account IO completion. bar_rq isn't accounted as a normal
* IO on queueing nor completion. Accounting the containing
* request is enough.
*/
if (disk && blk_fs_request(req) && req != &req->q->bar_rq) {
unsigned long duration = jiffies - req->start_time;
const int rw = rq_data_dir(req);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ int tty_insert_flip_string_flags(struct tty_struct *tty,
while (unlikely(size > copied));
return copied;
}
EXPORT_SYMBOL_GPL(tty_insert_flip_string_flags);
EXPORT_SYMBOL(tty_insert_flip_string_flags);

void tty_schedule_flip(struct tty_struct *tty)
{
Expand Down
22 changes: 11 additions & 11 deletions drivers/infiniband/hw/ipath/ipath_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1905,19 +1905,19 @@ static void __exit infinipath_cleanup(void)
} else
ipath_dbg("irq is 0, not doing free_irq "
"for unit %u\n", dd->ipath_unit);
dd->pcidev = NULL;
}

/*
* we check for NULL here, because it's outside the kregbase
* check, and we need to call it after the free_irq. Thus
* it's possible that the function pointers were never
* initialized.
*/
if (dd->ipath_f_cleanup)
/* clean up chip-specific stuff */
dd->ipath_f_cleanup(dd);
/*
* we check for NULL here, because it's outside
* the kregbase check, and we need to call it
* after the free_irq. Thus it's possible that
* the function pointers were never initialized.
*/
if (dd->ipath_f_cleanup)
/* clean up chip-specific stuff */
dd->ipath_f_cleanup(dd);

dd->pcidev = NULL;
}
spin_lock_irqsave(&ipath_devs_lock, flags);
}

Expand Down
7 changes: 3 additions & 4 deletions drivers/infiniband/hw/ipath/ipath_eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,11 +505,10 @@ static u8 flash_csum(struct ipath_flash *ifp, int adjust)
* ipath_get_guid - get the GUID from the i2c device
* @dd: the infinipath device
*
* When we add the multi-chip support, we will probably have to add
* the ability to use the number of guids field, and get the guid from
* the first chip's flash, to use for all of them.
* We have the capability to use the ipath_nguid field, and get
* the guid from the first chip's flash, to use for all of them.
*/
void ipath_get_guid(struct ipath_devdata *dd)
void ipath_get_eeprom_info(struct ipath_devdata *dd)
{
void *buf;
struct ipath_flash *ifp;
Expand Down
6 changes: 5 additions & 1 deletion drivers/infiniband/hw/ipath/ipath_file_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static int ipath_get_base_info(struct ipath_portdata *pd,
kinfo->spi_piosize = dd->ipath_ibmaxlen;
kinfo->spi_mtu = dd->ipath_ibmaxlen; /* maxlen, not ibmtu */
kinfo->spi_port = pd->port_port;
kinfo->spi_sw_version = IPATH_USER_SWVERSION;
kinfo->spi_sw_version = IPATH_KERN_SWVERSION;
kinfo->spi_hw_version = dd->ipath_revision;

if (copy_to_user(ubase, kinfo, sizeof(*kinfo)))
Expand Down Expand Up @@ -1224,6 +1224,10 @@ static unsigned int ipath_poll(struct file *fp,

if (tail == head) {
set_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag);
if(dd->ipath_rhdrhead_intr_off) /* arm rcv interrupt */
(void)ipath_write_ureg(dd, ur_rcvhdrhead,
dd->ipath_rhdrhead_intr_off
| head, pd->port_port);
poll_wait(fp, &pd->port_wait, pt);

if (test_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag)) {
Expand Down
21 changes: 19 additions & 2 deletions drivers/infiniband/hw/ipath/ipath_ht400.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,12 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
case 4: /* Ponderosa is one of the bringup boards */
n = "Ponderosa";
break;
case 5: /* HT-460 original production board */
case 5:
/*
* HT-460 original production board; two production levels, with
* different serial number ranges. See ipath_ht_early_init() for
* case where we enable IPATH_GPIO_INTR for later serial # range.
*/
n = "InfiniPath_HT-460";
break;
case 6:
Expand Down Expand Up @@ -642,7 +647,7 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
if (n)
snprintf(name, namelen, "%s", n);

if (dd->ipath_majrev != 3 || dd->ipath_minrev != 2) {
if (dd->ipath_majrev != 3 || (dd->ipath_minrev < 2 || dd->ipath_minrev > 3)) {
/*
* This version of the driver only supports the HT-400
* Rev 3.2
Expand Down Expand Up @@ -1520,6 +1525,18 @@ static int ipath_ht_early_init(struct ipath_devdata *dd)
*/
ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl,
INFINIPATH_S_ABORT);

ipath_get_eeprom_info(dd);
if(dd->ipath_boardrev == 5 && dd->ipath_serial[0] == '1' &&
dd->ipath_serial[1] == '2' && dd->ipath_serial[2] == '8') {
/*
* Later production HT-460 has same changes as HT-465, so
* can use GPIO interrupts. They have serial #'s starting
* with 128, rather than 112.
*/
dd->ipath_flags |= IPATH_GPIO_INTR;
dd->ipath_flags &= ~IPATH_POLL_RX_INTR;
}
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/infiniband/hw/ipath/ipath_init_chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,6 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit)

done:
if (!ret) {
ipath_get_guid(dd);
*dd->ipath_statusp |= IPATH_STATUS_CHIP_PRESENT;
if (!dd->ipath_f_intrsetup(dd)) {
/* now we can enable all interrupts from the chip */
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/ipath/ipath_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ u32 __iomem *ipath_getpiobuf(struct ipath_devdata *, u32 *);
void ipath_init_pe800_funcs(struct ipath_devdata *);
/* init HT-400-specific func */
void ipath_init_ht400_funcs(struct ipath_devdata *);
void ipath_get_guid(struct ipath_devdata *);
void ipath_get_eeprom_info(struct ipath_devdata *);
u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg);

/*
Expand Down
6 changes: 0 additions & 6 deletions drivers/infiniband/hw/ipath/ipath_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ int ipath_lkey_ok(struct ipath_lkey_table *rkt, struct ipath_sge *isge,
ret = 1;
goto bail;
}
spin_lock(&rkt->lock);
mr = rkt->table[(sge->lkey >> (32 - ib_ipath_lkey_table_size))];
spin_unlock(&rkt->lock);
if (unlikely(mr == NULL || mr->lkey != sge->lkey)) {
ret = 0;
goto bail;
Expand Down Expand Up @@ -184,8 +182,6 @@ int ipath_lkey_ok(struct ipath_lkey_table *rkt, struct ipath_sge *isge,
* @acc: access flags
*
* Return 1 if successful, otherwise 0.
*
* The QP r_rq.lock should be held.
*/
int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss,
u32 len, u64 vaddr, u32 rkey, int acc)
Expand All @@ -196,9 +192,7 @@ int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss,
size_t off;
int ret;

spin_lock(&rkt->lock);
mr = rkt->table[(rkey >> (32 - ib_ipath_lkey_table_size))];
spin_unlock(&rkt->lock);
if (unlikely(mr == NULL || mr->lkey != rkey)) {
ret = 0;
goto bail;
Expand Down
12 changes: 7 additions & 5 deletions drivers/infiniband/hw/ipath/ipath_layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,12 +872,13 @@ static void copy_io(u32 __iomem *piobuf, struct ipath_sge_state *ss,
update_sge(ss, len);
length -= len;
}
/* Update address before sending packet. */
update_sge(ss, length);
/* must flush early everything before trigger word */
ipath_flush_wc();
__raw_writel(last, piobuf);
/* be sure trigger word is written */
ipath_flush_wc();
update_sge(ss, length);
}

/**
Expand Down Expand Up @@ -943,17 +944,18 @@ int ipath_verbs_send(struct ipath_devdata *dd, u32 hdrwords,
if (likely(ss->num_sge == 1 && len <= ss->sge.length &&
!((unsigned long)ss->sge.vaddr & (sizeof(u32) - 1)))) {
u32 w;
u32 *addr = (u32 *) ss->sge.vaddr;

/* Update address before sending packet. */
update_sge(ss, len);
/* Need to round up for the last dword in the packet. */
w = (len + 3) >> 2;
__iowrite32_copy(piobuf, ss->sge.vaddr, w - 1);
__iowrite32_copy(piobuf, addr, w - 1);
/* must flush early everything before trigger word */
ipath_flush_wc();
__raw_writel(((u32 *) ss->sge.vaddr)[w - 1],
piobuf + w - 1);
__raw_writel(addr[w - 1], piobuf + w - 1);
/* be sure trigger word is written */
ipath_flush_wc();
update_sge(ss, len);
ret = 0;
goto bail;
}
Expand Down
2 changes: 2 additions & 0 deletions drivers/infiniband/hw/ipath/ipath_pe800.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,8 @@ static int ipath_pe_early_init(struct ipath_devdata *dd)
*/
dd->ipath_rhdrhead_intr_off = 1ULL<<32;

ipath_get_eeprom_info(dd);

return 0;
}

Expand Down
Loading

0 comments on commit f587fb7

Please sign in to comment.