Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27071
b: refs/heads/master
c: ba8f5ba
h: refs/heads/master
i:
  27069: 12d3479
  27067: 9a44ae4
  27063: 31ddae5
  27055: b66b89c
  27039: 73aa7e0
  27007: 0e05105
v: v3
  • Loading branch information
Linus Torvalds committed May 31, 2006
1 parent 76930b0 commit b75924c
Show file tree
Hide file tree
Showing 18 changed files with 122 additions and 119 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: 44d921b246923380f26b8010e47ac5dfe48fcec5
refs/heads/master: ba8f5baba79da8eb502f8534c3a8ecb64aceb790
4 changes: 2 additions & 2 deletions trunk/arch/arm/mm/mm-armv.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void __init build_mem_type_table(void)
ecc_mask = 0;
}

if (cpu_arch <= CPU_ARCH_ARMv5TEJ) {
if (cpu_arch <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) {
for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
if (mem_types[i].prot_l1)
mem_types[i].prot_l1 |= PMD_BIT4;
Expand Down Expand Up @@ -631,7 +631,7 @@ void setup_mm_for_reboot(char mode)
pgd = init_mm.pgd;

base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT;
if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ)
if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale())
base_pmdval |= PMD_BIT4;

for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) {
Expand Down
12 changes: 12 additions & 0 deletions trunk/arch/powerpc/platforms/powermac/low_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,7 @@ EXPORT_SYMBOL_GPL(pmac_i2c_xfer);
/* some quirks for platform function decoding */
enum {
pmac_i2c_quirk_invmask = 0x00000001u,
pmac_i2c_quirk_skip = 0x00000002u,
};

static void pmac_i2c_devscan(void (*callback)(struct device_node *dev,
Expand All @@ -1172,6 +1173,15 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev,
/* XXX Study device-tree's & apple drivers are get the quirks
* right !
*/
/* Workaround: It seems that running the clockspreading
* properties on the eMac will cause lockups during boot.
* The machine seems to work fine without that. So for now,
* let's make sure i2c-hwclock doesn't match about "imic"
* clocks and we'll figure out if we really need to do
* something special about those later.
*/
{ "i2c-hwclock", "imic5002", pmac_i2c_quirk_skip },
{ "i2c-hwclock", "imic5003", pmac_i2c_quirk_skip },
{ "i2c-hwclock", NULL, pmac_i2c_quirk_invmask },
{ "i2c-cpu-voltage", NULL, 0},
{ "temp-monitor", NULL, 0 },
Expand All @@ -1198,6 +1208,8 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev,
if (p->compatible &&
!device_is_compatible(np, p->compatible))
continue;
if (p->quirks & pmac_i2c_quirk_skip)
break;
callback(np, p->quirks);
break;
}
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/base/power/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*
*/

#include <linux/vt_kern.h>
#include <linux/device.h>
#include <linux/kallsyms.h>
#include <linux/pm.h>
Expand Down Expand Up @@ -66,6 +65,7 @@ int suspend_device(struct device * dev, pm_message_t state)
return error;
}


/**
* device_suspend - Save state and stop all devices in system.
* @state: Power state to put each device in.
Expand All @@ -85,9 +85,6 @@ int device_suspend(pm_message_t state)
{
int error = 0;

if (!is_console_suspend_safe())
return -EINVAL;

down(&dpm_sem);
down(&dpm_list_sem);
while (!list_empty(&dpm_active) && error == 0) {
Expand Down
38 changes: 22 additions & 16 deletions trunk/drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1184,20 +1184,20 @@ static void port_outl(struct si_sm_io *io, unsigned int offset,
static void port_cleanup(struct smi_info *info)
{
unsigned int addr = info->io.addr_data;
int mapsize;
int idx;

if (addr) {
mapsize = ((info->io_size * info->io.regspacing)
- (info->io.regspacing - info->io.regsize));

release_region (addr, mapsize);
for (idx = 0; idx < info->io_size; idx++) {
release_region(addr + idx * info->io.regspacing,
info->io.regsize);
}
}
}

static int port_setup(struct smi_info *info)
{
unsigned int addr = info->io.addr_data;
int mapsize;
int idx;

if (!addr)
return -ENODEV;
Expand Down Expand Up @@ -1225,16 +1225,22 @@ static int port_setup(struct smi_info *info)
return -EINVAL;
}

/* Calculate the total amount of memory to claim. This is an
* unusual looking calculation, but it avoids claiming any
* more memory than it has to. It will claim everything
* between the first address to the end of the last full
* register. */
mapsize = ((info->io_size * info->io.regspacing)
- (info->io.regspacing - info->io.regsize));

if (request_region(addr, mapsize, DEVICE_NAME) == NULL)
return -EIO;
/* Some BIOSes reserve disjoint I/O regions in their ACPI
* tables. This causes problems when trying to register the
* entire I/O region. Therefore we must register each I/O
* port separately.
*/
for (idx = 0; idx < info->io_size; idx++) {
if (request_region(addr + idx * info->io.regspacing,
info->io.regsize, DEVICE_NAME) == NULL) {
/* Undo allocations */
while (idx--) {
release_region(addr + idx * info->io.regspacing,
info->io.regsize);
}
return -EIO;
}
}
return 0;
}

Expand Down
89 changes: 29 additions & 60 deletions trunk/drivers/char/tpm/tpm_bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ static const char* tcpa_event_type_strings[] = {
"Non-Host Info"
};

struct tcpa_pc_event {
u32 event_id;
u32 event_size;
u8 event_data[0];
};

enum tcpa_pc_event_ids {
SMBIOS = 1,
BIS_CERT,
Expand All @@ -114,14 +120,15 @@ enum tcpa_pc_event_ids {
NVRAM,
OPTION_ROM_EXEC,
OPTION_ROM_CONFIG,
OPTION_ROM_MICROCODE,
OPTION_ROM_MICROCODE = 10,
S_CRTM_VERSION,
S_CRTM_CONTENTS,
POST_CONTENTS,
HOST_TABLE_OF_DEVICES,
};

static const char* tcpa_pc_event_id_strings[] = {
""
"",
"SMBIOS",
"BIS Certificate",
"POST BIOS ",
Expand All @@ -130,11 +137,12 @@ static const char* tcpa_pc_event_id_strings[] = {
"NVRAM",
"Option ROM",
"Option ROM config",
"Option ROM microcode",
"",
"Option ROM microcode ",
"S-CRTM Version",
"S-CRTM Contents",
"S-CRTM POST Contents",
"POST Contents",
"S-CRTM Contents ",
"POST Contents ",
"Table of Devices",
};

/* returns pointer to start of pos. entry of tcg log */
Expand Down Expand Up @@ -206,7 +214,7 @@ static int get_event_name(char *dest, struct tcpa_event *event,
const char *name = "";
char data[40] = "";
int i, n_len = 0, d_len = 0;
u32 event_id;
struct tcpa_pc_event *pc_event;

switch(event->event_type) {
case PREBOOT:
Expand Down Expand Up @@ -235,31 +243,32 @@ static int get_event_name(char *dest, struct tcpa_event *event,
}
break;
case EVENT_TAG:
event_id = be32_to_cpu(*((u32 *)event_entry));
pc_event = (struct tcpa_pc_event *)event_entry;

/* ToDo Row data -> Base64 */

switch (event_id) {
switch (pc_event->event_id) {
case SMBIOS:
case BIS_CERT:
case CMOS:
case NVRAM:
case OPTION_ROM_EXEC:
case OPTION_ROM_CONFIG:
case OPTION_ROM_MICROCODE:
case S_CRTM_VERSION:
case S_CRTM_CONTENTS:
case POST_CONTENTS:
name = tcpa_pc_event_id_strings[event_id];
name = tcpa_pc_event_id_strings[pc_event->event_id];
n_len = strlen(name);
break;
/* hash data */
case POST_BIOS_ROM:
case ESCD:
name = tcpa_pc_event_id_strings[event_id];
case OPTION_ROM_MICROCODE:
case S_CRTM_CONTENTS:
case POST_CONTENTS:
name = tcpa_pc_event_id_strings[pc_event->event_id];
n_len = strlen(name);
for (i = 0; i < 20; i++)
d_len += sprintf(data, "%02x",
event_entry[8 + i]);
d_len += sprintf(&data[2*i], "%02x",
pc_event->event_data[i]);
break;
default:
break;
Expand All @@ -275,53 +284,13 @@ static int get_event_name(char *dest, struct tcpa_event *event,

static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v)
{
struct tcpa_event *event = v;
char *data = v;
int i;

char *eventname;
char data[4];
u32 help;
int i, len;
struct tcpa_event *event = (struct tcpa_event *) v;
unsigned char *event_entry =
(unsigned char *) (v + sizeof(struct tcpa_event));

eventname = kmalloc(MAX_TEXT_EVENT, GFP_KERNEL);
if (!eventname) {
printk(KERN_ERR "%s: ERROR - No Memory for event name\n ",
__func__);
return -ENOMEM;
}

/* 1st: PCR used is in little-endian format (4 bytes) */
help = le32_to_cpu(event->pcr_index);
memcpy(data, &help, 4);
for (i = 0; i < 4; i++)
seq_putc(m, data[i]);

/* 2nd: SHA1 (20 bytes) */
for (i = 0; i < 20; i++)
seq_putc(m, event->pcr_value[i]);

/* 3rd: event type identifier (4 bytes) */
help = le32_to_cpu(event->event_type);
memcpy(data, &help, 4);
for (i = 0; i < 4; i++)
for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++)
seq_putc(m, data[i]);

len = 0;

len += get_event_name(eventname, event, event_entry);

/* 4th: filename <= 255 + \'0' delimiter */
if (len > TCG_EVENT_NAME_LEN_MAX)
len = TCG_EVENT_NAME_LEN_MAX;

for (i = 0; i < len; i++)
seq_putc(m, eventname[i]);

/* 5th: delimiter */
seq_putc(m, '\0');

kfree(eventname);
return 0;
}

Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -3238,14 +3238,6 @@ void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org)
}
}

int is_console_suspend_safe(void)
{
/* It is unsafe to suspend devices while X has control of the
* hardware. Make sure we are running on a kernel-controlled console.
*/
return vc_cons[fg_console].d->vc_mode == KD_TEXT;
}

/*
* Visible symbols for modules
*/
Expand Down
16 changes: 11 additions & 5 deletions trunk/drivers/ide/pci/sgiioc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,17 +345,17 @@ sgiioc4_resetproc(ide_drive_t * drive)
static u8
sgiioc4_INB(unsigned long port)
{
u8 reg = (u8) inb(port);
u8 reg = (u8) readb((void __iomem *) port);

if ((port & 0xFFF) == 0x11C) { /* Status register of IOC4 */
if (reg & 0x51) { /* Not busy...check for interrupt */
unsigned long other_ir = port - 0x110;
unsigned int intr_reg = (u32) inl(other_ir);
unsigned int intr_reg = (u32) readl((void __iomem *) other_ir);

/* Clear the Interrupt, Error bits on the IOC4 */
if (intr_reg & 0x03) {
outl(0x03, other_ir);
intr_reg = (u32) inl(other_ir);
writel(0x03, (void __iomem *) other_ir);
intr_reg = (u32) readl((void __iomem *) other_ir);
}
}
}
Expand Down Expand Up @@ -606,6 +606,12 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off;
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;
}

Expand Down Expand Up @@ -743,6 +749,6 @@ ioc4_ide_exit(void)
module_init(ioc4_ide_init);
module_exit(ioc4_ide_exit);

MODULE_AUTHOR("Aniket Malatpure - Silicon Graphics Inc. (SGI)");
MODULE_AUTHOR("Aniket Malatpure/Jeremy Higdon");
MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card");
MODULE_LICENSE("GPL");
11 changes: 10 additions & 1 deletion trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@ void md_new_event(mddev_t *mddev)
}
EXPORT_SYMBOL_GPL(md_new_event);

/* Alternate version that can be called from interrupts
* when calling sysfs_notify isn't needed.
*/
void md_new_event_inintr(mddev_t *mddev)
{
atomic_inc(&md_event_count);
wake_up(&md_event_waiters);
}

/*
* Enables to iterate over all existing md arrays
* all_mddevs_lock protects this list.
Expand Down Expand Up @@ -4149,7 +4158,7 @@ void md_error(mddev_t *mddev, mdk_rdev_t *rdev)
set_bit(MD_RECOVERY_INTR, &mddev->recovery);
set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
md_wakeup_thread(mddev->thread);
md_new_event(mddev);
md_new_event_inintr(mddev);
}

/* seq_file implementation /proc/mdstat */
Expand Down
Loading

0 comments on commit b75924c

Please sign in to comment.