From b0f1aa234ca38d41e45668d6e78f3c846be9d662 Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Wed, 18 May 2005 13:41:33 -0400 Subject: [PATCH] --- yaml --- r: 1349 b: refs/heads/master c: 9092f46b5aed4515d9a427d5dab3be1584851f07 h: refs/heads/master i: 1347: ab137c121d5e96c5cff1f0f2106e1ce06caac067 v: v3 --- [refs] | 2 +- trunk/Makefile | 2 +- trunk/arch/i386/mach-voyager/voyager_smp.c | 17 ++-- trunk/arch/ppc64/kernel/mf.c | 85 +++++-------------- trunk/arch/ppc64/kernel/rtc.c | 39 ++++++++- trunk/arch/ppc64/kernel/time.c | 1 - trunk/drivers/ide/ide-cd.c | 2 +- trunk/drivers/media/video/saa7134/saa6752hs.c | 10 +-- trunk/drivers/net/tulip/media.c | 1 + trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c | 7 +- trunk/drivers/usb/atm/speedtch.c | 2 - trunk/include/asm-ppc64/iSeries/mf.h | 1 - trunk/include/linux/wait.h | 4 +- trunk/kernel/signal.c | 11 +-- trunk/mm/rmap.c | 6 +- 15 files changed, 85 insertions(+), 105 deletions(-) diff --git a/[refs] b/[refs] index be91042b5bcd..c8f92bec5e71 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 384f1fcd2db8bc5a15f20f10793d8e1c82acd6c5 +refs/heads/master: 9092f46b5aed4515d9a427d5dab3be1584851f07 diff --git a/trunk/Makefile b/trunk/Makefile index c11a317ea910..1bb028317f2b 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 12 -EXTRAVERSION =-rc5 +EXTRAVERSION =-rc4 NAME=Woozy Numbat # *DOCUMENTATION* diff --git a/trunk/arch/i386/mach-voyager/voyager_smp.c b/trunk/arch/i386/mach-voyager/voyager_smp.c index a6e0ddd65bd0..903d739ca74a 100644 --- a/trunk/arch/i386/mach-voyager/voyager_smp.c +++ b/trunk/arch/i386/mach-voyager/voyager_smp.c @@ -97,6 +97,7 @@ static void ack_vic_irq(unsigned int irq); static void vic_enable_cpi(void); static void do_boot_cpu(__u8 cpuid); static void do_quad_bootstrap(void); +static inline void wrapper_smp_local_timer_interrupt(struct pt_regs *); int hard_smp_processor_id(void); @@ -124,14 +125,6 @@ send_QIC_CPI(__u32 cpuset, __u8 cpi) } } -static inline void -wrapper_smp_local_timer_interrupt(struct pt_regs *regs) -{ - irq_enter(); - smp_local_timer_interrupt(regs); - irq_exit(); -} - static inline void send_one_CPI(__u8 cpu, __u8 cpi) { @@ -1256,6 +1249,14 @@ smp_vic_timer_interrupt(struct pt_regs *regs) smp_local_timer_interrupt(regs); } +static inline void +wrapper_smp_local_timer_interrupt(struct pt_regs *regs) +{ + irq_enter(); + smp_local_timer_interrupt(regs); + irq_exit(); +} + /* local (per CPU) timer interrupt. It does both profiling and * process statistics/rescheduling. * diff --git a/trunk/arch/ppc64/kernel/mf.c b/trunk/arch/ppc64/kernel/mf.c index 5aca7e8005a8..1bd52ece497c 100644 --- a/trunk/arch/ppc64/kernel/mf.c +++ b/trunk/arch/ppc64/kernel/mf.c @@ -1,7 +1,7 @@ /* * mf.c * Copyright (C) 2001 Troy D. Armstrong IBM Corporation - * Copyright (C) 2004-2005 Stephen Rothwell IBM Corporation + * Copyright (C) 2004 Stephen Rothwell IBM Corporation * * This modules exists as an interface between a Linux secondary partition * running on an iSeries and the primary partition's Virtual Service @@ -36,12 +36,10 @@ #include #include -#include #include #include #include #include -#include /* * This is the structure layout for the Machine Facilites LPAR event @@ -698,23 +696,36 @@ static void get_rtc_time_complete(void *token, struct ce_msg_data *ce_msg) complete(&rtc->com); } -static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) +int mf_get_rtc(struct rtc_time *tm) { + struct ce_msg_comp_data ce_complete; + struct rtc_time_data rtc_data; + int rc; + + memset(&ce_complete, 0, sizeof(ce_complete)); + memset(&rtc_data, 0, sizeof(rtc_data)); + init_completion(&rtc_data.com); + ce_complete.handler = &get_rtc_time_complete; + ce_complete.token = &rtc_data; + rc = signal_ce_msg_simple(0x40, &ce_complete); + if (rc) + return rc; + wait_for_completion(&rtc_data.com); tm->tm_wday = 0; tm->tm_yday = 0; tm->tm_isdst = 0; - if (rc) { + if (rtc_data.rc) { tm->tm_sec = 0; tm->tm_min = 0; tm->tm_hour = 0; tm->tm_mday = 15; tm->tm_mon = 5; tm->tm_year = 52; - return rc; + return rtc_data.rc; } - if ((ce_msg[2] == 0xa9) || - (ce_msg[2] == 0xaf)) { + if ((rtc_data.ce_msg.ce_msg[2] == 0xa9) || + (rtc_data.ce_msg.ce_msg[2] == 0xaf)) { /* TOD clock is not set */ tm->tm_sec = 1; tm->tm_min = 1; @@ -725,6 +736,7 @@ static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) mf_set_rtc(tm); } { + u8 *ce_msg = rtc_data.ce_msg.ce_msg; u8 year = ce_msg[5]; u8 sec = ce_msg[6]; u8 min = ce_msg[7]; @@ -753,63 +765,6 @@ static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) return 0; } -int mf_get_rtc(struct rtc_time *tm) -{ - struct ce_msg_comp_data ce_complete; - struct rtc_time_data rtc_data; - int rc; - - memset(&ce_complete, 0, sizeof(ce_complete)); - memset(&rtc_data, 0, sizeof(rtc_data)); - init_completion(&rtc_data.com); - ce_complete.handler = &get_rtc_time_complete; - ce_complete.token = &rtc_data; - rc = signal_ce_msg_simple(0x40, &ce_complete); - if (rc) - return rc; - wait_for_completion(&rtc_data.com); - return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm); -} - -struct boot_rtc_time_data { - int busy; - struct ce_msg_data ce_msg; - int rc; -}; - -static void get_boot_rtc_time_complete(void *token, struct ce_msg_data *ce_msg) -{ - struct boot_rtc_time_data *rtc = token; - - memcpy(&rtc->ce_msg, ce_msg, sizeof(rtc->ce_msg)); - rtc->rc = 0; - rtc->busy = 0; -} - -int mf_get_boot_rtc(struct rtc_time *tm) -{ - struct ce_msg_comp_data ce_complete; - struct boot_rtc_time_data rtc_data; - int rc; - - memset(&ce_complete, 0, sizeof(ce_complete)); - memset(&rtc_data, 0, sizeof(rtc_data)); - rtc_data.busy = 1; - ce_complete.handler = &get_boot_rtc_time_complete; - ce_complete.token = &rtc_data; - rc = signal_ce_msg_simple(0x40, &ce_complete); - if (rc) - return rc; - /* We need to poll here as we are not yet taking interrupts */ - while (rtc_data.busy) { - extern unsigned long lpevent_count; - struct ItLpQueue *lpq = get_paca()->lpqueue_ptr; - if (lpq && ItLpQueue_isLpIntPending(lpq)) - lpevent_count += ItLpQueue_process(lpq, NULL); - } - return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm); -} - int mf_set_rtc(struct rtc_time *tm) { char ce_time[12]; diff --git a/trunk/arch/ppc64/kernel/rtc.c b/trunk/arch/ppc64/kernel/rtc.c index 67989055a9fe..3e70b91375fc 100644 --- a/trunk/arch/ppc64/kernel/rtc.c +++ b/trunk/arch/ppc64/kernel/rtc.c @@ -292,10 +292,47 @@ int iSeries_set_rtc_time(struct rtc_time *tm) void iSeries_get_boot_time(struct rtc_time *tm) { + unsigned long time; + static unsigned long lastsec = 1; + + u32 dataWord1 = *((u32 *)(&xSpCommArea.xBcdTimeAtIplStart)); + u32 dataWord2 = *(((u32 *)&(xSpCommArea.xBcdTimeAtIplStart)) + 1); + int year = 1970; + int year1 = ( dataWord1 >> 24 ) & 0x000000FF; + int year2 = ( dataWord1 >> 16 ) & 0x000000FF; + int sec = ( dataWord1 >> 8 ) & 0x000000FF; + int min = dataWord1 & 0x000000FF; + int hour = ( dataWord2 >> 24 ) & 0x000000FF; + int day = ( dataWord2 >> 8 ) & 0x000000FF; + int mon = dataWord2 & 0x000000FF; + if ( piranha_simulator ) return; - mf_get_boot_rtc(tm); + BCD_TO_BIN(sec); + BCD_TO_BIN(min); + BCD_TO_BIN(hour); + BCD_TO_BIN(day); + BCD_TO_BIN(mon); + BCD_TO_BIN(year1); + BCD_TO_BIN(year2); + year = year1 * 100 + year2; + + time = mktime(year, mon, day, hour, min, sec); + time += ( jiffies / HZ ); + + /* Now THIS is a nasty hack! + * It ensures that the first two calls get different answers. + * That way the loop in init_time (time.c) will not think + * the clock is stuck. + */ + if ( lastsec ) { + time -= lastsec; + --lastsec; + } + + to_tm(time, tm); + tm->tm_year -= 1900; tm->tm_mon -= 1; } #endif diff --git a/trunk/arch/ppc64/kernel/time.c b/trunk/arch/ppc64/kernel/time.c index 3d54745108c7..772a465b49f9 100644 --- a/trunk/arch/ppc64/kernel/time.c +++ b/trunk/arch/ppc64/kernel/time.c @@ -515,7 +515,6 @@ void __init time_init(void) do_gtod.varp = &do_gtod.vars[0]; do_gtod.var_idx = 0; do_gtod.varp->tb_orig_stamp = tb_last_stamp; - get_paca()->next_jiffy_update_tb = tb_last_stamp + tb_ticks_per_jiffy; do_gtod.varp->stamp_xsec = xtime.tv_sec * XSEC_PER_SEC; do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; do_gtod.varp->tb_to_xs = tb_to_xs; diff --git a/trunk/drivers/ide/ide-cd.c b/trunk/drivers/ide/ide-cd.c index 4f7ce7056228..33a020faeabd 100644 --- a/trunk/drivers/ide/ide-cd.c +++ b/trunk/drivers/ide/ide-cd.c @@ -1933,7 +1933,7 @@ static ide_startstop_t cdrom_do_block_pc(ide_drive_t *drive, struct request *rq) /* * check if dma is safe */ - if ((rq->data_len & 3) || (addr & mask)) + if ((rq->data_len & mask) || (addr & mask)) info->dma = 0; } diff --git a/trunk/drivers/media/video/saa7134/saa6752hs.c b/trunk/drivers/media/video/saa7134/saa6752hs.c index 1db022682980..fe6abe34168c 100644 --- a/trunk/drivers/media/video/saa7134/saa6752hs.c +++ b/trunk/drivers/media/video/saa7134/saa6752hs.c @@ -43,15 +43,15 @@ enum saa6752hs_videoformat { static const struct v4l2_format v4l2_format_table[] = { [SAA6752HS_VF_D1] = { - .fmt = { .pix = { .width = 720, .height = 576 }, }, }, + .fmt.pix.width = 720, .fmt.pix.height = 576 }, [SAA6752HS_VF_2_3_D1] = { - .fmt = { .pix = { .width = 480, .height = 576 }, }, }, + .fmt.pix.width = 480, .fmt.pix.height = 576 }, [SAA6752HS_VF_1_2_D1] = { - .fmt = { .pix = { .width = 352, .height = 576 }, }, }, + .fmt.pix.width = 352, .fmt.pix.height = 576 }, [SAA6752HS_VF_SIF] = { - .fmt = { .pix = { .width = 352, .height = 288 }, }, }, + .fmt.pix.width = 352, .fmt.pix.height = 288 }, [SAA6752HS_VF_UNKNOWN] = { - .fmt = { .pix = { .width = 0, .height = 0 }, }, }, + .fmt.pix.width = 0, .fmt.pix.height = 0}, }; struct saa6752hs_state { diff --git a/trunk/drivers/net/tulip/media.c b/trunk/drivers/net/tulip/media.c index edae09a4b021..919c40cd635c 100644 --- a/trunk/drivers/net/tulip/media.c +++ b/trunk/drivers/net/tulip/media.c @@ -174,6 +174,7 @@ void tulip_mdio_write(struct net_device *dev, int phy_id, int location, int val) break; } spin_unlock_irqrestore(&tp->mii_lock, flags); + return; } /* Establish sync by sending 32 logic ones. */ diff --git a/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c b/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c index c13e56320010..f90efa265ba2 100644 --- a/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -659,11 +659,8 @@ ahc_linux_slave_alloc(struct scsi_device *device) ahc_lock(ahc, &flags); targ = ahc->platform_data->targets[target_offset]; if (targ == NULL) { - struct seeprom_config *sc; - - targ = ahc_linux_alloc_target(ahc, starget->channel, - starget->id); - sc = ahc->seep_config; + targ = ahc_linux_alloc_target(ahc, starget->channel, starget->id); + struct seeprom_config *sc = ahc->seep_config; if (targ == NULL) goto out; diff --git a/trunk/drivers/usb/atm/speedtch.c b/trunk/drivers/usb/atm/speedtch.c index 2a1697bfd695..233f9229badb 100644 --- a/trunk/drivers/usb/atm/speedtch.c +++ b/trunk/drivers/usb/atm/speedtch.c @@ -386,8 +386,6 @@ static void speedtch_poll_status(struct speedtch_instance_data *instance) if (instance->u.atm_dev->signal != ATM_PHY_SIG_LOST) { instance->u.atm_dev->signal = ATM_PHY_SIG_LOST; printk(KERN_NOTICE "ADSL line is down\n"); - /* It'll never resync again unless we ask it to... */ - speedtch_start_synchro(instance); } break; diff --git a/trunk/include/asm-ppc64/iSeries/mf.h b/trunk/include/asm-ppc64/iSeries/mf.h index db333e1ee216..2e59a8e15a0b 100644 --- a/trunk/include/asm-ppc64/iSeries/mf.h +++ b/trunk/include/asm-ppc64/iSeries/mf.h @@ -52,7 +52,6 @@ extern void mf_clear_src(void); extern void mf_init(void); extern int mf_get_rtc(struct rtc_time *tm); -extern int mf_get_boot_rtc(struct rtc_time *tm); extern int mf_set_rtc(struct rtc_time *tm); #endif /* _ASM_PPC64_ISERIES_MF_H */ diff --git a/trunk/include/linux/wait.h b/trunk/include/linux/wait.h index c9486c3efb4a..17c874a8eb3f 100644 --- a/trunk/include/linux/wait.h +++ b/trunk/include/linux/wait.h @@ -386,7 +386,9 @@ int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); wait_queue_t name = { \ .task = current, \ .func = autoremove_wake_function, \ - .task_list = LIST_HEAD_INIT((name).task_list), \ + .task_list = { .next = &(name).task_list, \ + .prev = &(name).task_list, \ + }, \ } #define DEFINE_WAIT_BIT(name, word, bit) \ diff --git a/trunk/kernel/signal.c b/trunk/kernel/signal.c index b3c24c732c5a..8f3debc77c5b 100644 --- a/trunk/kernel/signal.c +++ b/trunk/kernel/signal.c @@ -522,16 +522,7 @@ static int __dequeue_signal(struct sigpending *pending, sigset_t *mask, { int sig = 0; - /* SIGKILL must have priority, otherwise it is quite easy - * to create an unkillable process, sending sig < SIGKILL - * to self */ - if (unlikely(sigismember(&pending->signal, SIGKILL))) { - if (!sigismember(mask, SIGKILL)) - sig = SIGKILL; - } - - if (likely(!sig)) - sig = next_signal(pending, mask); + sig = next_signal(pending, mask); if (sig) { if (current->notifier) { if (sigismember(current->notifier_mask, sig)) { diff --git a/trunk/mm/rmap.c b/trunk/mm/rmap.c index 9827409eb7c7..a6203b4e1278 100644 --- a/trunk/mm/rmap.c +++ b/trunk/mm/rmap.c @@ -626,7 +626,7 @@ static void try_to_unmap_cluster(unsigned long cursor, pgd_t *pgd; pud_t *pud; pmd_t *pmd; - pte_t *pte, *original_pte; + pte_t *pte; pte_t pteval; struct page *page; unsigned long address; @@ -658,7 +658,7 @@ static void try_to_unmap_cluster(unsigned long cursor, if (!pmd_present(*pmd)) goto out_unlock; - for (original_pte = pte = pte_offset_map(pmd, address); + for (pte = pte_offset_map(pmd, address); address < end; pte++, address += PAGE_SIZE) { if (!pte_present(*pte)) @@ -694,7 +694,7 @@ static void try_to_unmap_cluster(unsigned long cursor, (*mapcount)--; } - pte_unmap(original_pte); + pte_unmap(pte); out_unlock: spin_unlock(&mm->page_table_lock); }