Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58127
b: refs/heads/master
c: 0a9972b
h: refs/heads/master
i:
  58125: 2616f35
  58123: d8275a7
  58119: ec0a1bc
  58111: aeda7c6
v: v3
  • Loading branch information
Stefan Richter committed Jun 29, 2007
1 parent 8b35d70 commit 8eeedab
Show file tree
Hide file tree
Showing 22 changed files with 90 additions and 213 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: a38d6181ff27824c79fc7df825164a212eff6a3f
refs/heads/master: 0a9972baa7454c747fd5f67ce864420dff99d383
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 22
EXTRAVERSION = -rc7
EXTRAVERSION = -rc6
NAME = Holy Dancing Manatees, Batman!

# *DOCUMENTATION*
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-at91/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static suspend_state_t target_state;
/*
* Called after processes are frozen, but before we shutdown devices.
*/
static int at91_pm_set_target(suspend_state_t state)
static int at91_pm_prepare(suspend_state_t state)
{
target_state = state;
return 0;
Expand Down Expand Up @@ -201,7 +201,7 @@ static int at91_pm_enter(suspend_state_t state)

static struct pm_ops at91_pm_ops ={
.valid = at91_pm_valid_state,
.set_target = at91_pm_set_target,
.prepare = at91_pm_prepare,
.enter = at91_pm_enter,
};

Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/i386/kernel/cpu/mtrr/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ get_fixed_ranges(mtrr_type * frs)

void mtrr_save_fixed_ranges(void *info)
{
if (cpu_has_mtrr)
get_fixed_ranges(mtrr_state.fixed_ranges);
get_fixed_ranges(mtrr_state.fixed_ranges);
}

static void print_fixed(unsigned base, unsigned step, const mtrr_type*types)
Expand Down Expand Up @@ -470,6 +469,11 @@ int generic_validate_add_page(unsigned long base, unsigned long size, unsigned i
}
}

if (base < 0x100) {
printk(KERN_WARNING "mtrr: cannot set region below 1 MiB (0x%lx000,0x%lx000)\n",
base, size);
return -EINVAL;
}
/* Check upper bits of base and last are equal and lower bits are 0
for base and 1 for last */
last = base + size - 1;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/vdso64/gettimeofday.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
mr r11,r3 /* r11 holds tv */
mr r10,r4 /* r10 holds tz */
bl V_LOCAL_FUNC(__get_datapage) /* get data page */
cmpldi r11,0 /* check if tv is NULL */
cmpldi r10,0 /* check if tv is NULL */
beq 2f
bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */
lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */
Expand Down
12 changes: 1 addition & 11 deletions trunk/arch/sparc64/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,6 @@ static void sun4v_irq_enable(unsigned int virt_irq)
if (err != HV_EOK)
printk("sun4v_intr_settarget(%x,%lu): err(%d)\n",
ino, cpuid, err);
err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE);
if (err != HV_EOK)
printk("sun4v_intr_setstate(%x): "
"err(%d)\n", ino, err);
err = sun4v_intr_setenabled(ino, HV_INTR_ENABLED);
if (err != HV_EOK)
printk("sun4v_intr_setenabled(%x): err(%d)\n",
Expand Down Expand Up @@ -404,12 +400,6 @@ static void sun4v_virq_enable(unsigned int virt_irq)
"err(%d)\n",
dev_handle, dev_ino, cpuid, err);
err = sun4v_vintr_set_state(dev_handle, dev_ino,
HV_INTR_STATE_IDLE);
if (err != HV_EOK)
printk("sun4v_vintr_set_state(%lx,%lx,"
"HV_INTR_STATE_IDLE): err(%d)\n",
dev_handle, dev_ino, err);
err = sun4v_vintr_set_valid(dev_handle, dev_ino,
HV_INTR_ENABLED);
if (err != HV_EOK)
printk("sun4v_vintr_set_state(%lx,%lx,"
Expand All @@ -430,7 +420,7 @@ static void sun4v_virq_disable(unsigned int virt_irq)
dev_handle = ino & IMAP_IGN;
dev_ino = ino & IMAP_INO;

err = sun4v_vintr_set_valid(dev_handle, dev_ino,
err = sun4v_vintr_set_state(dev_handle, dev_ino,
HV_INTR_DISABLED);
if (err != HV_EOK)
printk("sun4v_vintr_set_state(%lx,%lx,"
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/acpi/asus_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ static int __init asus_acpi_init(void)
if (!asus_hotk_found) {
acpi_bus_unregister_driver(&asus_hotk_driver);
remove_proc_entry(PROC_ASUS, acpi_root_dir);
return -ENODEV;
return result;
}

asus_backlight_device = backlight_device_register("asus",NULL,NULL,
Expand All @@ -1407,7 +1407,6 @@ static int __init asus_acpi_init(void)
printk(KERN_ERR "Could not register asus backlight device\n");
asus_backlight_device = NULL;
asus_acpi_exit();
return -ENODEV;
}
asus_backlight_device->props.max_brightness = 15;

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/firewire/fw-ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ static void ar_context_tasklet(unsigned long data)

offset = offsetof(struct ar_buffer, data);
dma_unmap_single(ohci->card.device,
ab->descriptor.data_address - offset,
PAGE_SIZE, DMA_BIDIRECTIONAL);
le32_to_cpu(ab->descriptor.data_address) - offset,
PAGE_SIZE, DMA_BIDIRECTIONAL);

buffer = ab;
ab = ab->next;
Expand Down Expand Up @@ -427,7 +427,7 @@ static void ar_context_run(struct ar_context *ctx)
size_t offset;

offset = offsetof(struct ar_buffer, data);
ab_bus = ab->descriptor.data_address - offset;
ab_bus = le32_to_cpu(ab->descriptor.data_address) - offset;

reg_write(ctx->ohci, COMMAND_PTR(ctx->regs), ab_bus | 1);
reg_write(ctx->ohci, CONTROL_SET(ctx->regs), CONTEXT_RUN);
Expand Down
22 changes: 2 additions & 20 deletions trunk/drivers/misc/blink.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,12 @@ static void do_blink(unsigned long data)
add_timer(&blink_timer);
}

static int blink_panic_event(struct notifier_block *blk,
unsigned long event, void *arg)
{
do_blink(0);
return 0;
}

static struct notifier_block blink_notify = {
.notifier_call = blink_panic_event,
};

static __init int blink_init(void)
static int blink_init(void)
{
printk(KERN_INFO "Enabling keyboard blinking\n");
atomic_notifier_chain_register(&panic_notifier_list, &blink_notify);
do_blink(0);
return 0;
}

static __exit void blink_remove(void)
{
del_timer_sync(&blink_timer);
atomic_notifier_chain_unregister(&panic_notifier_list, &blink_notify);
}

module_init(blink_init);
module_exit(blink_remove);

2 changes: 1 addition & 1 deletion trunk/drivers/net/irda/irport.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ static void irport_timeout(struct net_device *dev)
IRDA_DEBUG(0, "%s(), iir=%02x, lsr=%02x, iobase=%#x\n",
__FUNCTION__, iir, lsr, iobase);

IRDA_DEBUG(0, "%s(), transmitting=%d, remain=%d, done=%td\n",
IRDA_DEBUG(0, "%s(), transmitting=%d, remain=%d, done=%d\n",
__FUNCTION__, self->transmitting, self->tx_buff.len,
self->tx_buff.data - self->tx_buff.head);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/irda/smsc-ircc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ MODULE_AUTHOR("Daniele Peri <peri@csai.unipa.it>");
MODULE_DESCRIPTION("SMC IrCC SIR/FIR controller driver");
MODULE_LICENSE("GPL");

static int smsc_nopnp = 1;
static int smsc_nopnp;
module_param_named(nopnp, smsc_nopnp, bool, 0);
MODULE_PARM_DESC(nopnp, "Do not use PNP to detect controller settings");

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-frv/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/sched.h>
struct mm_struct;
struct vm_area_struct;
#endif

Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-sparc64/mdesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ struct mdesc_node {
u64 node;
unsigned int unique_id;
unsigned int num_arcs;
unsigned int irqs[2];
struct property *properties;
struct mdesc_node *hash_next;
struct mdesc_node *allnodes_next;
Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-sparc64/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define _SPARC64_TLB_H

#include <linux/swap.h>
#include <linux/pagemap.h>
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
#include <asm/mmu_context.h>
Expand Down
11 changes: 0 additions & 11 deletions trunk/include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -748,17 +748,6 @@ static inline void pci_release_regions(struct pci_dev *dev) { }
static inline void pci_block_user_cfg_access(struct pci_dev *dev) { }
static inline void pci_unblock_user_cfg_access(struct pci_dev *dev) { }

static inline struct pci_bus *pci_find_next_bus(const struct pci_bus *from)
{ return NULL; }

static inline struct pci_dev *pci_get_slot(struct pci_bus *bus,
unsigned int devfn)
{ return NULL; }

static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,
unsigned int devfn)
{ return NULL; }

#endif /* CONFIG_PCI */

/* Include architecture-dependent settings and functions */
Expand Down
62 changes: 15 additions & 47 deletions trunk/include/linux/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,67 +110,37 @@ typedef int __bitwise suspend_state_t;
#define PM_SUSPEND_MAX ((__force suspend_state_t) 4)

/**
* struct pm_ops - Callbacks for managing platform dependent system sleep
* states.
* struct pm_ops - Callbacks for managing platform dependent suspend states.
* @valid: Callback to determine whether the given state can be entered.
* Valid states are advertised in /sys/power/state but can still
* be rejected by prepare or enter if the conditions aren't right.
* There is a %pm_valid_only_mem function available that can be assigned
* to this if you only implement mem sleep.
*
* @valid: Callback to determine if given system sleep state is supported by
* the platform.
* Valid (ie. supported) states are advertised in /sys/power/state. Note
* that it still may be impossible to enter given system sleep state if the
* conditions aren't right.
* There is the %pm_valid_only_mem function available that can be assigned
* to this if the platform only supports mem sleep.
* @prepare: Prepare the platform for the given suspend state. Can return a
* negative error code if necessary.
*
* @set_target: Tell the platform which system sleep state is going to be
* entered.
* @set_target() is executed right prior to suspending devices. The
* information conveyed to the platform code by @set_target() should be
* disregarded by the platform as soon as @finish() is executed and if
* @prepare() fails. If @set_target() fails (ie. returns nonzero),
* @prepare(), @enter() and @finish() will not be called by the PM core.
* This callback is optional. However, if it is implemented, the argument
* passed to @prepare(), @enter() and @finish() is meaningless and should
* be ignored.
* @enter: Enter the given suspend state, must be assigned. Can return a
* negative error code if necessary.
*
* @prepare: Prepare the platform for entering the system sleep state indicated
* by @set_target() or represented by the argument if @set_target() is not
* implemented.
* @prepare() is called right after devices have been suspended (ie. the
* appropriate .suspend() method has been executed for each device) and
* before the nonboot CPUs are disabled (it is executed with IRQs enabled).
* This callback is optional. It returns 0 on success or a negative
* error code otherwise, in which case the system cannot enter the desired
* sleep state (@enter() and @finish() will not be called in that case).
*
* @enter: Enter the system sleep state indicated by @set_target() or
* represented by the argument if @set_target() is not implemented.
* This callback is mandatory. It returns 0 on success or a negative
* error code otherwise, in which case the system cannot enter the desired
* sleep state.
*
* @finish: Called when the system has just left a sleep state, right after
* the nonboot CPUs have been enabled and before devices are resumed (it is
* executed with IRQs enabled). If @set_target() is not implemented, the
* argument represents the sleep state being left.
* This callback is optional, but should be implemented by the platforms
* that implement @prepare(). If implemented, it is always called after
* @enter() (even if @enter() fails).
* @finish: Called when the system has left the given state and all devices
* are resumed. The return value is ignored.
*/
struct pm_ops {
int (*valid)(suspend_state_t state);
int (*set_target)(suspend_state_t state);
int (*prepare)(suspend_state_t state);
int (*enter)(suspend_state_t state);
int (*finish)(suspend_state_t state);
};

extern struct pm_ops *pm_ops;

/**
* pm_set_ops - set platform dependent power management ops
* @pm_ops: The new power management operations to set.
*/
extern void pm_set_ops(struct pm_ops *pm_ops);
extern struct pm_ops *pm_ops;
extern int pm_suspend(suspend_state_t state);

extern int pm_valid_only_mem(suspend_state_t state);

/**
Expand All @@ -191,8 +161,6 @@ extern void arch_suspend_disable_irqs(void);
*/
extern void arch_suspend_enable_irqs(void);

extern int pm_suspend(suspend_state_t state);

/*
* Device power management
*/
Expand Down
6 changes: 1 addition & 5 deletions trunk/kernel/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/pm.h>
#include <linux/console.h>
#include <linux/cpu.h>
#include <linux/resume-trace.h>
Expand Down Expand Up @@ -96,11 +97,6 @@ static int suspend_prepare(suspend_state_t state)
}
}

if (pm_ops->set_target) {
error = pm_ops->set_target(state);
if (error)
goto Thaw;
}
suspend_console();
error = device_suspend(PMSG_SUSPEND);
if (error) {
Expand Down
1 change: 1 addition & 0 deletions trunk/mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ static inline struct kmem_cache *__find_general_cachep(size_t size,
*/
BUG_ON(malloc_sizes[INDEX_AC].cs_cachep == NULL);
#endif
WARN_ON_ONCE(size == 0);
while (size > csizep->cs_size)
csizep++;

Expand Down
Loading

0 comments on commit 8eeedab

Please sign in to comment.