Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65236
b: refs/heads/master
c: e2cd68f
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Oct 1, 2007
1 parent 54b28c3 commit 5840496
Show file tree
Hide file tree
Showing 85 changed files with 697 additions and 386 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: f998351c755a0e87785f2616c4f91f1b3b19b149
refs/heads/master: e2cd68f7cd07cc898581bd736ebdd6f2c2323c2e
2 changes: 2 additions & 0 deletions trunk/Documentation/devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ Your cooperation is appreciated.
9 = /dev/urandom Faster, less secure random number gen.
10 = /dev/aio Asynchronous I/O notification interface
11 = /dev/kmsg Writes to this come out as printk's
12 = /dev/oldmem Used by crashdump kernels to access
the memory of the kernel that crashed.

1 block RAM disk
0 = /dev/ram0 First RAM disk
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ static u32 handle_block_output(int fd, const struct iovec *iov,
* of the block file (possibly extending it). */
if (off + len > device_len) {
/* Trim it back to the correct length */
ftruncate(dev->fd, device_len);
ftruncate64(dev->fd, device_len);
/* Die, bad Guest, die. */
errx(1, "Write past end %llu+%u", off, len);
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/kernel/bios32.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ pbus_assign_bus_resources(struct pci_bus *bus, struct pci_sys_data *root)
* pcibios_fixup_bus - Called after each bus is probed,
* but before its children are examined.
*/
void __devinit pcibios_fixup_bus(struct pci_bus *bus)
void pcibios_fixup_bus(struct pci_bus *bus)
{
struct pci_sys_data *root = bus->sysdata;
struct pci_dev *dev;
Expand Down Expand Up @@ -419,7 +419,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
/*
* Convert from Linux-centric to bus-centric addresses for bridge devices.
*/
void __devinit
void
pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
struct resource *res)
{
Expand Down
39 changes: 29 additions & 10 deletions trunk/arch/i386/boot/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,41 @@

static int detect_memory_e820(void)
{
int count = 0;
u32 next = 0;
u32 size, id;
u8 err;
struct e820entry *desc = boot_params.e820_map;

do {
size = sizeof(struct e820entry);
id = SMAP;

/* Important: %edx is clobbered by some BIOSes,
so it must be either used for the error output
or explicitly marked clobbered. */
asm("int $0x15; setc %0"
: "=am" (err), "+b" (next), "+d" (id), "+c" (size),
: "=d" (err), "+b" (next), "=a" (id), "+c" (size),
"=m" (*desc)
: "D" (desc), "a" (0xe820));
: "D" (desc), "d" (SMAP), "a" (0xe820));

/* Some BIOSes stop returning SMAP in the middle of
the search loop. We don't know exactly how the BIOS
screwed up the map at that point, we might have a
partial map, the full map, or complete garbage, so
just return failure. */
if (id != SMAP) {
count = 0;
break;
}

if (err || id != SMAP)
if (err)
break;

boot_params.e820_entries++;
count++;
desc++;
} while (next && boot_params.e820_entries < E820MAX);
} while (next && count < E820MAX);

return boot_params.e820_entries;
return boot_params.e820_entries = count;
}

static int detect_memory_e801(void)
Expand Down Expand Up @@ -89,11 +103,16 @@ static int detect_memory_88(void)

int detect_memory(void)
{
int err = -1;

if (detect_memory_e820() > 0)
return 0;
err = 0;

if (!detect_memory_e801())
return 0;
err = 0;

if (!detect_memory_88())
err = 0;

return detect_memory_88();
return err;
}
5 changes: 4 additions & 1 deletion trunk/arch/i386/xen/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,9 @@ void xen_exit_mmap(struct mm_struct *mm)
put_cpu();

spin_lock(&mm->page_table_lock);
xen_pgd_unpin(mm->pgd);

/* pgd may not be pinned in the error exit path of execve */
if (PagePinned(virt_to_page(mm->pgd)))
xen_pgd_unpin(mm->pgd);
spin_unlock(&mm->page_table_lock);
}
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/scall64-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -525,5 +525,5 @@ sys_call_table:
PTR compat_sys_signalfd
PTR compat_sys_timerfd
PTR sys_eventfd
PTR sys_fallocate /* 4320 */
PTR sys32_fallocate /* 4320 */
.size sys_call_table,.-sys_call_table
4 changes: 2 additions & 2 deletions trunk/arch/mips/sgi-ip32/ip32-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ static struct platform_device uart8250_device = {

static int __init uart8250_init(void)
{
uart8250_data[0].iobase = (unsigned long) &mace->isa.serial1;
uart8250_data[1].iobase = (unsigned long) &mace->isa.serial1;
uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1;
uart8250_data[1].membase = (void __iomem *) &mace->isa.serial1;

return platform_device_register(&uart8250_device);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/boot/dts/mpc8349emitx.dts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
#size-cells = <0>;
interrupt-parent = < &ipic >;
interrupts = <26 8>;
dr_mode = "peripheral";
phy_type = "ulpi";
};

Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,13 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
regs->ccr = 0;
regs->gpr[1] = sp;

/*
* We have just cleared all the nonvolatile GPRs, so make
* FULL_REGS(regs) return true. This is necessary to allow
* ptrace to examine the thread immediately after exec.
*/
regs->trap &= ~1UL;

#ifdef CONFIG_PPC32
regs->mq = 0;
regs->nip = start;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/platforms/83xx/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ int mpc834x_usb_cfg(void)
if (port0_is_dr)
printk(KERN_WARNING
"834x USB port0 can't be used by both DR and MPH!\n");
sicrl |= MPC834X_SICRL_USB0;
sicrl &= ~MPC834X_SICRL_USB0;
}
prop = of_get_property(np, "port1", NULL);
if (prop) {
if (port1_is_dr)
printk(KERN_WARNING
"834x USB port1 can't be used by both DR and MPH!\n");
sicrl |= MPC834X_SICRL_USB1;
sicrl &= ~MPC834X_SICRL_USB1;
}
of_node_put(np);
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/platforms/cell/spufs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2177,8 +2177,8 @@ struct tree_descr spufs_dir_contents[] = {
{ "mbox_stat", &spufs_mbox_stat_fops, 0444, },
{ "ibox_stat", &spufs_ibox_stat_fops, 0444, },
{ "wbox_stat", &spufs_wbox_stat_fops, 0444, },
{ "signal1", &spufs_signal1_nosched_fops, 0222, },
{ "signal2", &spufs_signal2_nosched_fops, 0222, },
{ "signal1", &spufs_signal1_fops, 0666, },
{ "signal2", &spufs_signal2_fops, 0666, },
{ "signal1_type", &spufs_signal1_type, 0666, },
{ "signal2_type", &spufs_signal2_type, 0666, },
{ "cntl", &spufs_cntl_fops, 0666, },
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/sysdev/commproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,4 +395,4 @@ uint cpm_dpram_phys(u8* addr)
{
return (dpram_pbase + (uint)(addr - dpram_vbase));
}
EXPORT_SYMBOL(cpm_dpram_addr);
EXPORT_SYMBOL(cpm_dpram_phys);
2 changes: 1 addition & 1 deletion trunk/arch/ppc/8xx_io/commproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ EXPORT_SYMBOL(cpm_dpdump);

void *cpm_dpram_addr(unsigned long offset)
{
return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset;
return (void *)(dpram_vbase + offset);
}
EXPORT_SYMBOL(cpm_dpram_addr);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/sleep/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
obj-y := wakeup.o
obj-$(CONFIG_ACPI_SLEEP) += main.o
obj-y += main.o
obj-$(CONFIG_ACPI_SLEEP) += proc.o

EXTRA_CFLAGS += $(ACPI_CFLAGS)
46 changes: 25 additions & 21 deletions trunk/drivers/acpi/sleep/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,30 @@

u8 sleep_states[ACPI_S_STATE_COUNT];

#ifdef CONFIG_PM_SLEEP
static u32 acpi_target_sleep_state = ACPI_STATE_S0;
#endif

int acpi_sleep_prepare(u32 acpi_state)
{
#ifdef CONFIG_ACPI_SLEEP
/* do we have a wakeup address for S2 and S3? */
if (acpi_state == ACPI_STATE_S3) {
if (!acpi_wakeup_address) {
return -EFAULT;
}
acpi_set_firmware_waking_vector((acpi_physical_address)
virt_to_phys((void *)
acpi_wakeup_address));

}
ACPI_FLUSH_CPU_CACHE();
acpi_enable_wakeup_device_prep(acpi_state);
#endif
acpi_gpe_sleep_prepare(acpi_state);
acpi_enter_sleep_state_prep(acpi_state);
return 0;
}

#ifdef CONFIG_SUSPEND
static struct pm_ops acpi_pm_ops;
Expand Down Expand Up @@ -60,27 +83,6 @@ static int acpi_pm_set_target(suspend_state_t pm_state)
return error;
}

int acpi_sleep_prepare(u32 acpi_state)
{
#ifdef CONFIG_ACPI_SLEEP
/* do we have a wakeup address for S2 and S3? */
if (acpi_state == ACPI_STATE_S3) {
if (!acpi_wakeup_address) {
return -EFAULT;
}
acpi_set_firmware_waking_vector((acpi_physical_address)
virt_to_phys((void *)
acpi_wakeup_address));

}
ACPI_FLUSH_CPU_CACHE();
acpi_enable_wakeup_device_prep(acpi_state);
#endif
acpi_gpe_sleep_prepare(acpi_state);
acpi_enter_sleep_state_prep(acpi_state);
return 0;
}

/**
* acpi_pm_prepare - Do preliminary suspend work.
* @pm_state: ignored
Expand Down Expand Up @@ -299,6 +301,7 @@ int acpi_suspend(u32 acpi_state)
return -EINVAL;
}

#ifdef CONFIG_PM_SLEEP
/**
* acpi_pm_device_sleep_state - return preferred power state of ACPI device
* in the system sleep state given by %acpi_target_sleep_state
Expand Down Expand Up @@ -373,6 +376,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p)
*d_min_p = d_min;
return d_max;
}
#endif

static void acpi_power_off_prepare(void)
{
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/ata/pata_sis.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,9 @@ static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev)
int drive_pci = sis_old_port_base(adev);
u16 timing;

/* MWDMA 0-2 and UDMA 0-5 */
const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 };
const u16 udma_bits[] = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000};
const u16 udma_bits[] = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000, 0x8000 };

pci_read_config_word(pdev, drive_pci, &timing);

Expand Down
16 changes: 12 additions & 4 deletions trunk/drivers/ata/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,16 +888,23 @@ static inline void sil24_host_intr(struct ata_port *ap)
u32 slot_stat, qc_active;
int rc;

/* If PCIX_IRQ_WOC, there's an inherent race window between
* clearing IRQ pending status and reading PORT_SLOT_STAT
* which may cause spurious interrupts afterwards. This is
* unavoidable and much better than losing interrupts which
* happens if IRQ pending is cleared after reading
* PORT_SLOT_STAT.
*/
if (ap->flags & SIL24_FLAG_PCIX_IRQ_WOC)
writel(PORT_IRQ_COMPLETE, port + PORT_IRQ_STAT);

slot_stat = readl(port + PORT_SLOT_STAT);

if (unlikely(slot_stat & HOST_SSTAT_ATTN)) {
sil24_error_intr(ap);
return;
}

if (ap->flags & SIL24_FLAG_PCIX_IRQ_WOC)
writel(PORT_IRQ_COMPLETE, port + PORT_IRQ_STAT);

qc_active = slot_stat & ~HOST_SSTAT_ATTN;
rc = ata_qc_complete_multiple(ap, qc_active, sil24_finish_qc);
if (rc > 0)
Expand All @@ -910,7 +917,8 @@ static inline void sil24_host_intr(struct ata_port *ap)
return;
}

if (ata_ratelimit())
/* spurious interrupts are expected if PCIX_IRQ_WOC */
if (!(ap->flags & SIL24_FLAG_PCIX_IRQ_WOC) && ata_ratelimit())
ata_port_printk(ap, KERN_INFO, "spurious interrupt "
"(slot_stat 0x%x active_tag %d sactive 0x%x)\n",
slot_stat, ap->active_tag, ap->sactive);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ static ssize_t show_uevent(struct device *dev, struct device_attribute *attr,

/* let the kset specific function add its keys */
pos = data;
memset(envp, 0, sizeof(envp));
retval = kset->uevent_ops->uevent(kset, &dev->kobj,
envp, ARRAY_SIZE(envp),
pos, PAGE_SIZE);
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/cdrom/cdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,10 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp)
check_disk_change(ip->i_bdev);
return 0;
err_release:
if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) {
cdi->ops->lock_door(cdi, 0);
cdinfo(CD_OPEN, "door unlocked.\n");
}
cdi->ops->release(cdi);
err:
cdi->use_count--;
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/char/drm/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
#define I915REG_INT_MASK_R 0x020a8
#define I915REG_INT_ENABLE_R 0x020a0

#define I915REG_PIPEASTAT 0x70024
#define I915REG_PIPEBSTAT 0x71024

#define I915_VBLANK_INTERRUPT_ENABLE (1UL<<17)
#define I915_VBLANK_CLEAR (1UL<<1)

#define SRX_INDEX 0x3c4
#define SRX_DATA 0x3c5
#define SR01 1
Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/char/drm/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
struct drm_device *dev = (struct drm_device *) arg;
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
u16 temp;
u32 pipea_stats, pipeb_stats;

pipea_stats = I915_READ(I915REG_PIPEASTAT);
pipeb_stats = I915_READ(I915REG_PIPEBSTAT);

temp = I915_READ16(I915REG_INT_IDENTITY_R);

Expand All @@ -225,6 +229,8 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
return IRQ_NONE;

I915_WRITE16(I915REG_INT_IDENTITY_R, temp);
(void) I915_READ16(I915REG_INT_IDENTITY_R);
DRM_READMEMORYBARRIER();

dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv);

Expand Down Expand Up @@ -252,6 +258,12 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)

if (dev_priv->swaps_pending > 0)
drm_locked_tasklet(dev, i915_vblank_tasklet);
I915_WRITE(I915REG_PIPEASTAT,
pipea_stats|I915_VBLANK_INTERRUPT_ENABLE|
I915_VBLANK_CLEAR);
I915_WRITE(I915REG_PIPEBSTAT,
pipeb_stats|I915_VBLANK_INTERRUPT_ENABLE|
I915_VBLANK_CLEAR);
}

return IRQ_HANDLED;
Expand Down
Loading

0 comments on commit 5840496

Please sign in to comment.