Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41058
b: refs/heads/master
c: 490a6e2
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Nov 23, 2006
1 parent 373e6b3 commit 3968a46
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 17 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: ec7080d185a9b79581bf1dbe300e877719c0b1a9
refs/heads/master: 490a6e245e36ce27e10c32e1c3129fd782d3d1f3
2 changes: 1 addition & 1 deletion trunk/drivers/char/agp/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ void *agp_generic_alloc_page(struct agp_bridge_data *bridge)
{
struct page * page;

page = alloc_page(GFP_KERNEL);
page = alloc_page(GFP_KERNEL | GFP_DMA32);
if (page == NULL)
return NULL;

Expand Down
33 changes: 25 additions & 8 deletions trunk/drivers/char/agp/intel-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static void *i8xx_alloc_pages(void)
{
struct page * page;

page = alloc_pages(GFP_KERNEL, 2);
page = alloc_pages(GFP_KERNEL | GFP_DMA32, 2);
if (page == NULL)
return NULL;

Expand Down Expand Up @@ -387,11 +387,7 @@ static void intel_i830_init_gtt_entries(void)
/* We obtain the size of the GTT, which is also stored (for some
* reason) at the top of stolen memory. Then we add 4KB to that
* for the video BIOS popup, which is also stored in there. */

if (IS_I965)
size = 512 + 4;
else
size = agp_bridge->driver->fetch_size() + 4;
size = agp_bridge->driver->fetch_size() + 4;

if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82830_HB ||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82845G_HB) {
Expand Down Expand Up @@ -805,6 +801,26 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)

return 0;
}

/*
* The i965 supports 36-bit physical addresses, but to keep
* the format of the GTT the same, the bits that don't fit
* in a 32-bit word are shifted down to bits 4..7.
*
* Gcc is smart enough to notice that "(addr >> 28) & 0xf0"
* is always zero on 32-bit architectures, so no need to make
* this conditional.
*/
static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge,
unsigned long addr, int type)
{
/* Shift high bits down */
addr |= (addr >> 28) & 0xf0;

/* Type checking must be done elsewhere */
return addr | bridge->driver->masks[type].mask;
}

static int intel_i965_fetch_size(void)
{
struct aper_size_info_fixed *values;
Expand Down Expand Up @@ -832,7 +848,8 @@ static int intel_i965_fetch_size(void)

agp_bridge->previous_size = agp_bridge->current_size = (void *)(values + offset);

return values[offset].size;
/* The i965 GTT is always sized as if it had a 512kB aperture size */
return 512;
}

/* The intel i965 automatically initializes the agp aperture during POST.
Expand Down Expand Up @@ -1584,7 +1601,7 @@ static struct agp_bridge_driver intel_i965_driver = {
.fetch_size = intel_i965_fetch_size,
.cleanup = intel_i915_cleanup,
.tlb_flush = intel_i810_tlbflush,
.mask_memory = intel_i810_mask_memory,
.mask_memory = intel_i965_mask_memory,
.masks = intel_i810_masks,
.agp_enable = intel_i810_agp_enable,
.cache_flush = global_cache_flush,
Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/irq/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ fastcall unsigned int __do_IRQ(unsigned int irq)
spin_unlock(&desc->lock);

action_ret = handle_IRQ_event(irq, action);

spin_lock(&desc->lock);
if (!noirqdebug)
note_interrupt(irq, desc, action_ret);

spin_lock(&desc->lock);
if (likely(!(desc->status & IRQ_PENDING)))
break;
desc->status &= ~IRQ_PENDING;
Expand Down
6 changes: 1 addition & 5 deletions trunk/kernel/irq/spurious.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,7 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc,
if (unlikely(irqfixup)) {
/* Don't punish working computers */
if ((irqfixup == 2 && irq == 0) || action_ret == IRQ_NONE) {
int ok;

spin_unlock(&desc->lock);
ok = misrouted_irq(irq);
spin_lock(&desc->lock);
int ok = misrouted_irq(irq);
if (action_ret == IRQ_NONE)
desc->irqs_unhandled -= ok;
}
Expand Down

0 comments on commit 3968a46

Please sign in to comment.