Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33783
b: refs/heads/master
c: d738752
h: refs/heads/master
i:
  33781: df61bf6
  33779: 582556b
  33775: bcedd9c
v: v3
  • Loading branch information
Linus Torvalds committed Sep 1, 2006
1 parent 6e59bb4 commit 76809da
Show file tree
Hide file tree
Showing 33 changed files with 399 additions and 223 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: db59b464f8708cdba857f16b183cff0b7466d6b5
refs/heads/master: d738752fc46c4cc339bc66346cf6134446ce08db
7 changes: 7 additions & 0 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ Who: Adrian Bunk <bunk@stusta.de>

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

What: drivers depending on OSS_OBSOLETE_DRIVER
When: options in 2.6.20, code in 2.6.22
Why: OSS drivers with ALSA replacements
Who: Adrian Bunk <bunk@stusta.de>

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

What: pci_module_init(driver)
When: January 2007
Why: Is replaced by pci_register_driver(pci_driver).
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/kernel/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static int __init init_hpet_clocksource(void)
void __iomem* hpet_base;
u64 tmp;

if (!hpet_address)
if (!is_hpet_enabled())
return -ENODEV;

/* calculate the hpet address: */
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/platforms/powermac/pic.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ static void __pmac_retrigger(unsigned int irq_nr)
static void pmac_mask_and_ack_irq(unsigned int virq)
{
unsigned int src = irq_map[virq].hwirq;
unsigned long bit = 1UL << (virq & 0x1f);
int i = virq >> 5;
unsigned long bit = 1UL << (src & 0x1f);
int i = src >> 5;
unsigned long flags;

spin_lock_irqsave(&pmac_pic_lock, flags);
Expand Down Expand Up @@ -175,7 +175,7 @@ static void pmac_mask_irq(unsigned int virq)

spin_lock_irqsave(&pmac_pic_lock, flags);
__clear_bit(src, ppc_cached_irq_mask);
__pmac_set_irq_mask(src, 0);
__pmac_set_irq_mask(src, 1);
spin_unlock_irqrestore(&pmac_pic_lock, flags);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/xtensa/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
*/
case PTRACE_KILL:
ret = 0;
if (child->state == EXIT_ZOMBIE) /* already dead */
if (child->exit_state == EXIT_ZOMBIE) /* already dead */
break;
child->exit_code = SIGKILL;
child->ptrace &= ~PT_SINGLESTEP;
Expand Down
12 changes: 5 additions & 7 deletions trunk/drivers/block/floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -4177,6 +4177,11 @@ static int __init floppy_init(void)
int i, unit, drive;
int err, dr;

#if defined(CONFIG_PPC_MERGE)
if (check_legacy_ioport(FDC1))
return -ENODEV;
#endif

raw_cmd = NULL;

for (dr = 0; dr < N_DRIVE; dr++) {
Expand Down Expand Up @@ -4234,13 +4239,6 @@ static int __init floppy_init(void)
}

use_virtual_dma = can_use_virtual_dma & 1;
#if defined(CONFIG_PPC_MERGE)
if (check_legacy_ioport(FDC1)) {
del_timer(&fd_timeout);
err = -ENODEV;
goto out_unreg_region;
}
#endif
fdc_state[0].address = FDC1;
if (fdc_state[0].address == -1) {
del_timer(&fd_timeout);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -3428,6 +3428,7 @@ struct ipmi_recv_msg *ipmi_alloc_recv_msg(void)

rv = kmalloc(sizeof(struct ipmi_recv_msg), GFP_ATOMIC);
if (rv) {
rv->user = NULL;
rv->done = free_recv_msg;
atomic_inc(&recv_msg_inuse_count);
}
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/char/synclink_gt.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ static MGSL_PARAMS default_params = {
#define DESC_LIST_SIZE 4096

#define MASK_PARITY BIT1
#define MASK_FRAMING BIT2
#define MASK_BREAK BIT3
#define MASK_FRAMING BIT0
#define MASK_BREAK BIT14
#define MASK_OVERRUN BIT4

#define GSR 0x00 /* global status */
Expand Down Expand Up @@ -1800,17 +1800,17 @@ static void rx_async(struct slgt_info *info)

stat = 0;

if ((status = *(p+1) & (BIT9 + BIT8))) {
if (status & BIT9)
if ((status = *(p+1) & (BIT1 + BIT0))) {
if (status & BIT1)
icount->parity++;
else if (status & BIT8)
else if (status & BIT0)
icount->frame++;
/* discard char if tty control flags say so */
if (status & info->ignore_status_mask)
continue;
if (status & BIT9)
if (status & BIT1)
stat = TTY_PARITY;
else if (status & BIT8)
else if (status & BIT0)
stat = TTY_FRAME;
}
if (tty) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/char/watchdog/sbc8360.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static int wd_margin = 0xB;
static int wd_multiplier = 2;
static int nowayout = WATCHDOG_NOWAYOUT;

module_param(timeout, int, 27);
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Index into timeout table (0-63) (default=27 (60s))");
module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout,
Expand Down Expand Up @@ -407,7 +407,7 @@ module_exit(sbc8360_exit);
MODULE_AUTHOR("Ian E. Morgan <imorgan@webcon.ca>");
MODULE_DESCRIPTION("SBC8360 watchdog driver");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0");
MODULE_VERSION("1.01");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);

/* end of sbc8360.c */
60 changes: 42 additions & 18 deletions trunk/drivers/ide/pci/sgiioc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,13 @@ sgiioc4_INB(unsigned long port)
static void __devinit
ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base)
{
void __iomem *virt_dma_base;
int num_ports = sizeof (ioc4_dma_regs_t);

printk(KERN_INFO "%s: BM-DMA at 0x%04lx-0x%04lx\n", hwif->name,
dma_base, dma_base + num_ports - 1);

if (!request_region(dma_base, num_ports, hwif->name)) {
if (!request_mem_region(dma_base, num_ports, hwif->name)) {
printk(KERN_ERR
"%s(%s) -- ERROR, Addresses 0x%p to 0x%p "
"ALREADY in use\n",
Expand All @@ -381,13 +382,21 @@ ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base)
goto dma_alloc_failure;
}

hwif->dma_base = dma_base;
virt_dma_base = ioremap(dma_base, num_ports);
if (virt_dma_base == NULL) {
printk(KERN_ERR
"%s(%s) -- ERROR, Unable to map addresses 0x%lx to 0x%lx\n",
__FUNCTION__, hwif->name, dma_base, dma_base + num_ports - 1);
goto dma_remap_failure;
}
hwif->dma_base = (unsigned long) virt_dma_base;

hwif->dmatable_cpu = pci_alloc_consistent(hwif->pci_dev,
IOC4_PRD_ENTRIES * IOC4_PRD_BYTES,
&hwif->dmatable_dma);

if (!hwif->dmatable_cpu)
goto dma_alloc_failure;
goto dma_pci_alloc_failure;

hwif->sg_max_nents = IOC4_PRD_ENTRIES;

Expand All @@ -411,6 +420,12 @@ ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base)
printk(KERN_INFO
"Changing from DMA to PIO mode for Drive %s\n", hwif->name);

dma_pci_alloc_failure:
iounmap(virt_dma_base);

dma_remap_failure:
release_mem_region(dma_base, num_ports);

dma_alloc_failure:
/* Disable DMA because we couldnot allocate any DMA maps */
hwif->autodma = 0;
Expand Down Expand Up @@ -607,18 +622,15 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq;
hwif->ide_dma_timeout = &__ide_dma_timeout;

/*
* The IOC4 uses MMIO rather than Port IO.
* It also needs special workarounds for INB.
*/
default_hwif_mmiops(hwif);
hwif->INB = &sgiioc4_INB;
}

static int __devinit
sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
{
unsigned long base, ctl, dma_base, irqport;
unsigned long cmd_base, dma_base, irqport;
unsigned long bar0, cmd_phys_base, ctl;
void __iomem *virt_base;
ide_hwif_t *hwif;
int h;

Expand All @@ -636,23 +648,32 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
}

/* Get the CmdBlk and CtrlBlk Base Registers */
base = pci_resource_start(dev, 0) + IOC4_CMD_OFFSET;
ctl = pci_resource_start(dev, 0) + IOC4_CTRL_OFFSET;
irqport = pci_resource_start(dev, 0) + IOC4_INTR_OFFSET;
bar0 = pci_resource_start(dev, 0);
virt_base = ioremap(bar0, pci_resource_len(dev, 0));
if (virt_base == NULL) {
printk(KERN_ERR "%s: Unable to remap BAR 0 address: 0x%lx\n",
d->name, bar0);
return -ENOMEM;
}
cmd_base = (unsigned long) virt_base + IOC4_CMD_OFFSET;
ctl = (unsigned long) virt_base + IOC4_CTRL_OFFSET;
irqport = (unsigned long) virt_base + IOC4_INTR_OFFSET;
dma_base = pci_resource_start(dev, 0) + IOC4_DMA_OFFSET;

if (!request_region(base, IOC4_CMD_CTL_BLK_SIZE, hwif->name)) {
cmd_phys_base = bar0 + IOC4_CMD_OFFSET;
if (!request_mem_region(cmd_phys_base, IOC4_CMD_CTL_BLK_SIZE,
hwif->name)) {
printk(KERN_ERR
"%s : %s -- ERROR, Port Addresses "
"%s : %s -- ERROR, Addresses "
"0x%p to 0x%p ALREADY in use\n",
__FUNCTION__, hwif->name, (void *) base,
(void *) base + IOC4_CMD_CTL_BLK_SIZE);
__FUNCTION__, hwif->name, (void *) cmd_phys_base,
(void *) cmd_phys_base + IOC4_CMD_CTL_BLK_SIZE);
return -ENOMEM;
}

if (hwif->io_ports[IDE_DATA_OFFSET] != base) {
if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) {
/* Initialize the IO registers */
sgiioc4_init_hwif_ports(&hwif->hw, base, ctl, irqport);
sgiioc4_init_hwif_ports(&hwif->hw, cmd_base, ctl, irqport);
memcpy(hwif->io_ports, hwif->hw.io_ports,
sizeof (hwif->io_ports));
hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
Expand All @@ -665,6 +686,9 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
hwif->cds = (struct ide_pci_device_s *) d;
hwif->gendev.parent = &dev->dev;/* setup proper ancestral information */

/* The IOC4 uses MMIO rather than Port IO. */
default_hwif_mmiops(hwif);

/* Initializing chipset IRQ Registers */
hwif->OUTL(0x03, irqport + IOC4_INTR_SET * 4);

Expand Down
15 changes: 11 additions & 4 deletions trunk/drivers/infiniband/hw/mthca/mthca_allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@
/* Trivial bitmap-based allocator */
u32 mthca_alloc(struct mthca_alloc *alloc)
{
unsigned long flags;
u32 obj;

spin_lock(&alloc->lock);
spin_lock_irqsave(&alloc->lock, flags);

obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last);
if (obj >= alloc->max) {
alloc->top = (alloc->top + alloc->max) & alloc->mask;
Expand All @@ -56,19 +58,24 @@ u32 mthca_alloc(struct mthca_alloc *alloc)
} else
obj = -1;

spin_unlock(&alloc->lock);
spin_unlock_irqrestore(&alloc->lock, flags);

return obj;
}

void mthca_free(struct mthca_alloc *alloc, u32 obj)
{
unsigned long flags;

obj &= alloc->max - 1;
spin_lock(&alloc->lock);

spin_lock_irqsave(&alloc->lock, flags);

clear_bit(obj, alloc->table);
alloc->last = min(alloc->last, obj);
alloc->top = (alloc->top + alloc->max) & alloc->mask;
spin_unlock(&alloc->lock);

spin_unlock_irqrestore(&alloc->lock, flags);
}

int mthca_alloc_init(struct mthca_alloc *alloc, u32 num, u32 mask,
Expand Down
Loading

0 comments on commit 76809da

Please sign in to comment.