Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30988
b: refs/heads/master
c: 873d889
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jun 28, 2006
1 parent 5e52091 commit c4ef285
Show file tree
Hide file tree
Showing 137 changed files with 1,360 additions and 1,682 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: d3e5e1a1b4f43bcfa1a34516e233911487c67307
refs/heads/master: 873d8898b7f6aeb4f2085381dbc201d68a37d02b
10 changes: 10 additions & 0 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,16 @@ Who: Jean Delvare <khali@linux-fr.org>

---------------------------

What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports
(temporary transition config option provided until then)
The transition config option will also be removed at the same time.
When: before 2.6.19
Why: Unused symbols are both increasing the size of the kernel binary
and are often a sign of "wrong API"
Who: Arjan van de Ven <arjan@linux.intel.com>

---------------------------

What: remove EXPORT_SYMBOL(tasklist_lock)
When: August 2006
Files: kernel/fork.c
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/i386/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
u32 *isp;
#endif

if (unlikely((unsigned)irq >= NR_IRQS)) {
printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
__FUNCTION__, irq);
BUG();
}

irq_enter();
#ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 1KB free? */
Expand Down
10 changes: 4 additions & 6 deletions trunk/arch/i386/kernel/sysenter.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,10 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
vma->vm_mm = mm;

ret = insert_vm_struct(mm, vma);
if (ret)
goto free_vma;
if (unlikely(ret)) {
kmem_cache_free(vm_area_cachep, vma);
goto up_fail;
}

current->mm->context.vdso = (void *)addr;
current_thread_info()->sysenter_return =
Expand All @@ -158,10 +160,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
up_fail:
up_write(&mm->mmap_sem);
return ret;

free_vma:
kmem_cache_free(vm_area_cachep, vma);
return ret;
}

const char *arch_vma_name(struct vm_area_struct *vma)
Expand Down
14 changes: 12 additions & 2 deletions trunk/arch/powerpc/platforms/powermac/backlight.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,14 @@ int pmac_backlight_set_legacy_brightness(int brightness)
down(&pmac_backlight->sem);
props = pmac_backlight->props;
props->brightness = brightness *
props->max_brightness / OLD_BACKLIGHT_MAX;
(props->max_brightness + 1) /
(OLD_BACKLIGHT_MAX + 1);

if (props->brightness > props->max_brightness)
props->brightness = props->max_brightness;
else if (props->brightness < 0)
props->brightness = 0;

props->update_status(pmac_backlight);
up(&pmac_backlight->sem);

Expand All @@ -140,8 +147,11 @@ int pmac_backlight_get_legacy_brightness()

down(&pmac_backlight->sem);
props = pmac_backlight->props;

result = props->brightness *
OLD_BACKLIGHT_MAX / props->max_brightness;
(OLD_BACKLIGHT_MAX + 1) /
(props->max_brightness + 1);

up(&pmac_backlight->sem);
}
mutex_unlock(&pmac_backlight_mutex);
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/x86_64/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
/* high bit used in ret_from_ code */
unsigned irq = ~regs->orig_rax;

if (unlikely(irq >= NR_IRQS)) {
printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
__FUNCTION__, irq);
BUG();
}

exit_idle();
irq_enter();
#ifdef CONFIG_DEBUG_STACKOVERFLOW
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86_64/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,11 +607,13 @@ void set_nmi_callback(nmi_callback_t callback)
vmalloc_sync_all();
rcu_assign_pointer(nmi_callback, callback);
}
EXPORT_SYMBOL_GPL(set_nmi_callback);

void unset_nmi_callback(void)
{
nmi_callback = dummy_nmi_callback;
}
EXPORT_SYMBOL_GPL(unset_nmi_callback);

#ifdef CONFIG_SYSCTL

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec,
{
struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */
struct address_space *mapping = file->f_mapping;
struct address_space_operations *aops = mapping->a_ops;
const struct address_space_operations *aops = mapping->a_ops;
pgoff_t index;
unsigned offset, bv_offs;
int len, ret;
Expand Down Expand Up @@ -784,7 +784,7 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,

error = -EINVAL;
if (S_ISREG(inode->i_mode) || S_ISBLK(inode->i_mode)) {
struct address_space_operations *aops = mapping->a_ops;
const struct address_space_operations *aops = mapping->a_ops;
/*
* If we can't read - sorry. If we only can't write - well,
* it's going to be read-only.
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/block/rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static int ramdisk_set_page_dirty(struct page *page)
return 0;
}

static struct address_space_operations ramdisk_aops = {
static const struct address_space_operations ramdisk_aops = {
.readpage = ramdisk_readpage,
.prepare_write = ramdisk_prepare_write,
.commit_write = ramdisk_commit_write,
Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -3738,11 +3738,8 @@ static int ipmi_init_msghandler(void)
proc_ipmi_root->owner = THIS_MODULE;
#endif /* CONFIG_PROC_FS */

init_timer(&ipmi_timer);
ipmi_timer.data = 0;
ipmi_timer.function = ipmi_timeout;
ipmi_timer.expires = jiffies + IPMI_TIMEOUT_JIFFIES;
add_timer(&ipmi_timer);
setup_timer(&ipmi_timer, ipmi_timeout, 0);
mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);

atomic_notifier_chain_register(&panic_notifier_list, &panic_block);

Expand Down
67 changes: 0 additions & 67 deletions trunk/drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,6 @@
#include <linux/mutex.h>
#include <linux/kthread.h>
#include <asm/irq.h>
#ifdef CONFIG_HIGH_RES_TIMERS
#include <linux/hrtime.h>
# if defined(schedule_next_int)
/* Old high-res timer code, do translations. */
# define get_arch_cycles(a) quick_update_jiffies_sub(a)
# define arch_cycles_per_jiffy cycles_per_jiffies
# endif
static inline void add_usec_to_timer(struct timer_list *t, long v)
{
t->arch_cycle_expires += nsec_to_arch_cycle(v * 1000);
while (t->arch_cycle_expires >= arch_cycles_per_jiffy)
{
t->expires++;
t->arch_cycle_expires -= arch_cycles_per_jiffy;
}
}
#endif
#include <linux/interrupt.h>
#include <linux/rcupdate.h>
#include <linux/ipmi_smi.h>
Expand Down Expand Up @@ -243,8 +226,6 @@ static int register_xaction_notifier(struct notifier_block * nb)
return atomic_notifier_chain_register(&xaction_notifier_list, nb);
}

static void si_restart_short_timer(struct smi_info *smi_info);

static void deliver_recv_msg(struct smi_info *smi_info,
struct ipmi_smi_msg *msg)
{
Expand Down Expand Up @@ -768,7 +749,6 @@ static void sender(void *send_info,
&& (smi_info->curr_msg == NULL))
{
start_next_msg(smi_info);
si_restart_short_timer(smi_info);
}
spin_unlock_irqrestore(&(smi_info->si_lock), flags);
}
Expand Down Expand Up @@ -833,37 +813,6 @@ static void request_events(void *send_info)

static int initialized = 0;

/* Must be called with interrupts off and with the si_lock held. */
static void si_restart_short_timer(struct smi_info *smi_info)
{
#if defined(CONFIG_HIGH_RES_TIMERS)
unsigned long flags;
unsigned long jiffies_now;
unsigned long seq;

if (del_timer(&(smi_info->si_timer))) {
/* If we don't delete the timer, then it will go off
immediately, anyway. So we only process if we
actually delete the timer. */

do {
seq = read_seqbegin_irqsave(&xtime_lock, flags);
jiffies_now = jiffies;
smi_info->si_timer.expires = jiffies_now;
smi_info->si_timer.arch_cycle_expires
= get_arch_cycles(jiffies_now);
} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));

add_usec_to_timer(&smi_info->si_timer, SI_SHORT_TIMEOUT_USEC);

add_timer(&(smi_info->si_timer));
spin_lock_irqsave(&smi_info->count_lock, flags);
smi_info->timeout_restarts++;
spin_unlock_irqrestore(&smi_info->count_lock, flags);
}
#endif
}

static void smi_timeout(unsigned long data)
{
struct smi_info *smi_info = (struct smi_info *) data;
Expand Down Expand Up @@ -904,31 +853,15 @@ static void smi_timeout(unsigned long data)
/* If the state machine asks for a short delay, then shorten
the timer timeout. */
if (smi_result == SI_SM_CALL_WITH_DELAY) {
#if defined(CONFIG_HIGH_RES_TIMERS)
unsigned long seq;
#endif
spin_lock_irqsave(&smi_info->count_lock, flags);
smi_info->short_timeouts++;
spin_unlock_irqrestore(&smi_info->count_lock, flags);
#if defined(CONFIG_HIGH_RES_TIMERS)
do {
seq = read_seqbegin_irqsave(&xtime_lock, flags);
smi_info->si_timer.expires = jiffies;
smi_info->si_timer.arch_cycle_expires
= get_arch_cycles(smi_info->si_timer.expires);
} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
add_usec_to_timer(&smi_info->si_timer, SI_SHORT_TIMEOUT_USEC);
#else
smi_info->si_timer.expires = jiffies + 1;
#endif
} else {
spin_lock_irqsave(&smi_info->count_lock, flags);
smi_info->long_timeouts++;
spin_unlock_irqrestore(&smi_info->count_lock, flags);
smi_info->si_timer.expires = jiffies + SI_TIMEOUT_JIFFIES;
#if defined(CONFIG_HIGH_RES_TIMERS)
smi_info->si_timer.arch_cycle_expires = 0;
#endif
}

do_add_timer:
Expand Down
18 changes: 10 additions & 8 deletions trunk/drivers/char/ipmi/ipmi_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,9 +949,10 @@ static int wdog_reboot_handler(struct notifier_block *this,
/* Disable the WDT if we are shutting down. */
ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
panic_halt_ipmi_set_timeout();
} else {
} else if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
/* Set a long timer to let the reboot happens, but
reboot if it hangs. */
reboot if it hangs, but only if the watchdog
timer was already running. */
timeout = 120;
pretimeout = 0;
ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
Expand All @@ -973,16 +974,17 @@ static int wdog_panic_handler(struct notifier_block *this,
{
static int panic_event_handled = 0;

/* On a panic, if we have a panic timeout, make sure that the thing
reboots, even if it hangs during that panic. */
if (watchdog_user && !panic_event_handled) {
/* Make sure the panic doesn't hang, and make sure we
do this only once. */
/* On a panic, if we have a panic timeout, make sure to extend
the watchdog timer to a reasonable value to complete the
panic, if the watchdog timer is running. Plus the
pretimeout is meaningless at panic time. */
if (watchdog_user && !panic_event_handled &&
ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
/* Make sure we do this only once. */
panic_event_handled = 1;

timeout = 255;
pretimeout = 0;
ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
panic_halt_ipmi_set_timeout();
}

Expand Down
Loading

0 comments on commit c4ef285

Please sign in to comment.