Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87317
b: refs/heads/master
c: 7c0ea45
h: refs/heads/master
i:
  87315: 9755c38
v: v3
  • Loading branch information
Zhao Yakui authored and Len Brown committed Mar 12, 2008
1 parent 1b1bd51 commit ea5921f
Show file tree
Hide file tree
Showing 16 changed files with 77 additions and 221 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: 391df5dce30a5aab477b9e55ea65a3e83bae96b1
refs/heads/master: 7c0ea45be4f114d85ee35caeead8e1660699c46f
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2156,7 +2156,7 @@ L: netdev@vger.kernel.org
S: Maintained

IPATH DRIVER:
P: Ralph Campbell
P: Arthur Jones
M: infinipath@qlogic.com
L: general@lists.openfabrics.org
T: git git://git.qlogic.com/ipath-linux-2.6
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ config MMU
config ZONE_DMA
def_bool y

config QUICKLIST
def_bool X86_32

config SBUS
bool

Expand Down
9 changes: 1 addition & 8 deletions trunk/arch/x86/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,17 +1055,10 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 value)
R32(esi, si);
R32(ebp, bp);
R32(eax, ax);
R32(orig_eax, orig_ax);
R32(eip, ip);
R32(esp, sp);

case offsetof(struct user32, regs.orig_eax):
/*
* Sign-extend the value so that orig_eax = -1
* causes (long)orig_ax < 0 tests to fire correctly.
*/
regs->orig_ax = (long) (s32) value;
break;

case offsetof(struct user32, regs.eflags):
return set_flags(child, value);

Expand Down
38 changes: 5 additions & 33 deletions trunk/arch/x86/kernel/signal_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,35 +310,6 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
return -EFAULT;
}

/*
* Return -1L or the syscall number that @regs is executing.
*/
static long current_syscall(struct pt_regs *regs)
{
/*
* We always sign-extend a -1 value being set here,
* so this is always either -1L or a syscall number.
*/
return regs->orig_ax;
}

/*
* Return a value that is -EFOO if the system call in @regs->orig_ax
* returned an error. This only works for @regs from @current.
*/
static long current_syscall_ret(struct pt_regs *regs)
{
#ifdef CONFIG_IA32_EMULATION
if (test_thread_flag(TIF_IA32))
/*
* Sign-extend the value so (int)-EFOO becomes (long)-EFOO
* and will match correctly in comparisons.
*/
return (int) regs->ax;
#endif
return regs->ax;
}

/*
* OK, we're invoking a handler
*/
Expand All @@ -356,9 +327,9 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
#endif

/* Are we from a system call? */
if (current_syscall(regs) >= 0) {
if ((long)regs->orig_ax >= 0) {
/* If so, check system call restarting.. */
switch (current_syscall_ret(regs)) {
switch (regs->ax) {
case -ERESTART_RESTARTBLOCK:
case -ERESTARTNOHAND:
regs->ax = -EINTR;
Expand Down Expand Up @@ -455,9 +426,10 @@ static void do_signal(struct pt_regs *regs)
}

/* Did we come from a system call? */
if (current_syscall(regs) >= 0) {
if ((long)regs->orig_ax >= 0) {
/* Restart the system call - no handlers present */
switch (current_syscall_ret(regs)) {
long res = regs->ax;
switch (res) {
case -ERESTARTNOHAND:
case -ERESTARTSYS:
case -ERESTARTNOINTR:
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ static void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
return NULL;
}

WARN_ON_ONCE(page_is_ram(pfn));

switch (mode) {
case IOR_MODE_UNCACHED:
default:
Expand Down
18 changes: 9 additions & 9 deletions trunk/arch/x86/mm/pgtable_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,12 @@ static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp)

pgd_t *pgd_alloc(struct mm_struct *mm)
{
pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
pgd_t *pgd = quicklist_alloc(0, GFP_KERNEL, pgd_ctor);

/* so that alloc_pd can use it */
mm->pgd = pgd;
if (pgd)
pgd_ctor(pgd);
mm->pgd = pgd; /* so that alloc_pd can use it */

if (pgd && !pgd_prepopulate_pmd(mm, pgd)) {
pgd_dtor(pgd);
free_page((unsigned long)pgd);
quicklist_free(0, pgd_dtor, pgd);
pgd = NULL;
}

Expand All @@ -361,8 +357,12 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
void pgd_free(struct mm_struct *mm, pgd_t *pgd)
{
pgd_mop_up_pmds(mm, pgd);
pgd_dtor(pgd);
free_page((unsigned long)pgd);
quicklist_free(0, pgd_dtor, pgd);
}

void check_pgt_cache(void)
{
quicklist_trim(0, pgd_dtor, 25, 16);
}

void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
Expand Down
98 changes: 0 additions & 98 deletions trunk/drivers/acpi/pci_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/


#include <linux/dmi.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
Expand Down Expand Up @@ -77,101 +76,6 @@ static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(int segment,
return NULL;
}

/* http://bugzilla.kernel.org/show_bug.cgi?id=4773 */
static struct dmi_system_id medion_md9580[] = {
{
.ident = "Medion MD9580-F laptop",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "MEDIONNB"),
DMI_MATCH(DMI_PRODUCT_NAME, "A555"),
},
},
{ }
};

/* http://bugzilla.kernel.org/show_bug.cgi?id=5044 */
static struct dmi_system_id dell_optiplex[] = {
{
.ident = "Dell Optiplex GX1",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX1 600S+"),
},
},
{ }
};

/* http://bugzilla.kernel.org/show_bug.cgi?id=10138 */
static struct dmi_system_id hp_t5710[] = {
{
.ident = "HP t5710",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "hp t5000 series"),
DMI_MATCH(DMI_BOARD_NAME, "098Ch"),
},
},
{ }
};

struct prt_quirk {
struct dmi_system_id *system;
unsigned int segment;
unsigned int bus;
unsigned int device;
unsigned char pin;
char *source; /* according to BIOS */
char *actual_source;
};

/*
* These systems have incorrect _PRT entries. The BIOS claims the PCI
* interrupt at the listed segment/bus/device/pin is connected to the first
* link device, but it is actually connected to the second.
*/
static struct prt_quirk prt_quirks[] = {
{ medion_md9580, 0, 0, 9, 'A',
"\\_SB_.PCI0.ISA.LNKA",
"\\_SB_.PCI0.ISA.LNKB"},
{ dell_optiplex, 0, 0, 0xd, 'A',
"\\_SB_.LNKB",
"\\_SB_.LNKA"},
{ hp_t5710, 0, 0, 1, 'A',
"\\_SB_.PCI0.LNK1",
"\\_SB_.PCI0.LNK3"},
};

static void
do_prt_fixups(struct acpi_prt_entry *entry, struct acpi_pci_routing_table *prt)
{
int i;
struct prt_quirk *quirk;

for (i = 0; i < ARRAY_SIZE(prt_quirks); i++) {
quirk = &prt_quirks[i];

/* All current quirks involve link devices, not GSIs */
if (!prt->source)
continue;

if (dmi_check_system(quirk->system) &&
entry->id.segment == quirk->segment &&
entry->id.bus == quirk->bus &&
entry->id.device == quirk->device &&
entry->pin + 'A' == quirk->pin &&
!strcmp(prt->source, quirk->source) &&
strlen(prt->source) >= strlen(quirk->actual_source)) {
printk(KERN_WARNING PREFIX "firmware reports "
"%04x:%02x:%02x[%c] connected to %s; "
"changing to %s\n",
entry->id.segment, entry->id.bus,
entry->id.device, 'A' + entry->pin,
prt->source, quirk->actual_source);
strcpy(prt->source, quirk->actual_source);
}
}
}

static int
acpi_pci_irq_add_entry(acpi_handle handle,
int segment, int bus, struct acpi_pci_routing_table *prt)
Expand All @@ -192,8 +96,6 @@ acpi_pci_irq_add_entry(acpi_handle handle,
entry->id.function = prt->address & 0xFFFF;
entry->pin = prt->pin;

do_prt_fixups(entry, prt);

/*
* Type 1: Dynamic
* ---------------
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)

kfree(obj);

if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){
if (device->cap._BCL && device->cap._BCM && max_level > 0) {
int result;
static int count = 0;
char *name;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/infiniband/core/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3759,7 +3759,6 @@ static void cm_remove_one(struct ib_device *device)
port = cm_dev->port[i-1];
ib_modify_port(device, port->port_num, 0, &port_modify);
ib_unregister_mad_agent(port->mad_agent);
flush_workqueue(cm.wq);
cm_remove_port_fs(port);
}
kobject_put(&cm_dev->dev_obj);
Expand Down Expand Up @@ -3814,14 +3813,14 @@ static void __exit ib_cm_cleanup(void)
cancel_delayed_work(&timewait_info->work.work);
spin_unlock_irq(&cm.lock);

ib_unregister_client(&cm_client);
destroy_workqueue(cm.wq);

list_for_each_entry_safe(timewait_info, tmp, &cm.timewait_list, list) {
list_del(&timewait_info->list);
kfree(timewait_info);
}

ib_unregister_client(&cm_client);
class_unregister(&cm_class);
idr_destroy(&cm.local_id_table);
}
Expand Down
38 changes: 16 additions & 22 deletions trunk/drivers/infiniband/core/fmr_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static inline struct ib_pool_fmr *ib_fmr_cache_lookup(struct ib_fmr_pool *pool,
static void ib_fmr_batch_release(struct ib_fmr_pool *pool)
{
int ret;
struct ib_pool_fmr *fmr;
struct ib_pool_fmr *fmr, *next;
LIST_HEAD(unmap_list);
LIST_HEAD(fmr_list);

Expand All @@ -158,6 +158,20 @@ static void ib_fmr_batch_release(struct ib_fmr_pool *pool)
#endif
}

/*
* The free_list may hold FMRs that have been put there
* because they haven't reached the max_remap count.
* Invalidate their mapping as well.
*/
list_for_each_entry_safe(fmr, next, &pool->free_list, list) {
if (fmr->remap_count == 0)
continue;
hlist_del_init(&fmr->cache_node);
fmr->remap_count = 0;
list_add_tail(&fmr->fmr->list, &fmr_list);
list_move(&fmr->list, &unmap_list);
}

list_splice(&pool->dirty_list, &unmap_list);
INIT_LIST_HEAD(&pool->dirty_list);
pool->dirty_len = 0;
Expand Down Expand Up @@ -370,11 +384,6 @@ void ib_destroy_fmr_pool(struct ib_fmr_pool *pool)

i = 0;
list_for_each_entry_safe(fmr, tmp, &pool->free_list, list) {
if (fmr->remap_count) {
INIT_LIST_HEAD(&fmr_list);
list_add_tail(&fmr->fmr->list, &fmr_list);
ib_unmap_fmr(&fmr_list);
}
ib_dealloc_fmr(fmr->fmr);
list_del(&fmr->list);
kfree(fmr);
Expand All @@ -398,23 +407,8 @@ EXPORT_SYMBOL(ib_destroy_fmr_pool);
*/
int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
{
int serial;
struct ib_pool_fmr *fmr, *next;

/*
* The free_list holds FMRs that may have been used
* but have not been remapped enough times to be dirty.
* Put them on the dirty list now so that the cleanup
* thread will reap them too.
*/
spin_lock_irq(&pool->pool_lock);
list_for_each_entry_safe(fmr, next, &pool->free_list, list) {
if (fmr->remap_count > 0)
list_move(&fmr->list, &pool->dirty_list);
}
spin_unlock_irq(&pool->pool_lock);
int serial = atomic_inc_return(&pool->req_ser);

serial = atomic_inc_return(&pool->req_ser);
wake_up_process(pool->thread);

if (wait_event_interruptible(pool->force_wait,
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/infiniband/core/iwcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,6 @@ static void cm_work_handler(struct work_struct *_work)
unsigned long flags;
int empty;
int ret = 0;
int destroy_id;

spin_lock_irqsave(&cm_id_priv->lock, flags);
empty = list_empty(&cm_id_priv->work_list);
Expand All @@ -858,9 +857,9 @@ static void cm_work_handler(struct work_struct *_work)
destroy_cm_id(&cm_id_priv->id);
}
BUG_ON(atomic_read(&cm_id_priv->refcount)==0);
destroy_id = test_bit(IWCM_F_CALLBACK_DESTROY, &cm_id_priv->flags);
if (iwcm_deref_id(cm_id_priv)) {
if (destroy_id) {
if (test_bit(IWCM_F_CALLBACK_DESTROY,
&cm_id_priv->flags)) {
BUG_ON(!list_empty(&cm_id_priv->work_list));
free_cm_id(cm_id_priv);
}
Expand Down
Loading

0 comments on commit ea5921f

Please sign in to comment.