···9797static void vic_enable_cpi(void);9898static void do_boot_cpu(__u8 cpuid);9999static void do_quad_bootstrap(void);100100-static inline void wrapper_smp_local_timer_interrupt(struct pt_regs *);101100102101int hard_smp_processor_id(void);103102···122123 send_one_QIC_CPI(cpu, cpi - QIC_CPI_OFFSET);123124 }124125 }126126+}127127+128128+static inline void129129+wrapper_smp_local_timer_interrupt(struct pt_regs *regs)130130+{131131+ irq_enter();132132+ smp_local_timer_interrupt(regs);133133+ irq_exit();125134}126135127136static inline void···12541247{12551248 send_CPI_allbutself(VIC_TIMER_CPI);12561249 smp_local_timer_interrupt(regs);12571257-}12581258-12591259-static inline void12601260-wrapper_smp_local_timer_interrupt(struct pt_regs *regs)12611261-{12621262- irq_enter();12631263- smp_local_timer_interrupt(regs);12641264- irq_exit();12651250}1266125112671252/* local (per CPU) timer interrupt. It does both profiling and
+65-20
arch/ppc64/kernel/mf.c
···11/*22 * mf.c33 * Copyright (C) 2001 Troy D. Armstrong IBM Corporation44- * Copyright (C) 2004 Stephen Rothwell IBM Corporation44+ * Copyright (C) 2004-2005 Stephen Rothwell IBM Corporation55 *66 * This modules exists as an interface between a Linux secondary partition77 * running on an iSeries and the primary partition's Virtual Service···36363737#include <asm/time.h>3838#include <asm/uaccess.h>3939+#include <asm/paca.h>3940#include <asm/iSeries/vio.h>4041#include <asm/iSeries/mf.h>4142#include <asm/iSeries/HvLpConfig.h>4243#include <asm/iSeries/ItSpCommArea.h>4444+#include <asm/iSeries/ItLpQueue.h>43454446/*4547 * This is the structure layout for the Machine Facilites LPAR event···698696 complete(&rtc->com);699697}700698701701-int mf_get_rtc(struct rtc_time *tm)699699+static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm)702700{703703- struct ce_msg_comp_data ce_complete;704704- struct rtc_time_data rtc_data;705705- int rc;706706-707707- memset(&ce_complete, 0, sizeof(ce_complete));708708- memset(&rtc_data, 0, sizeof(rtc_data));709709- init_completion(&rtc_data.com);710710- ce_complete.handler = &get_rtc_time_complete;711711- ce_complete.token = &rtc_data;712712- rc = signal_ce_msg_simple(0x40, &ce_complete);713713- if (rc)714714- return rc;715715- wait_for_completion(&rtc_data.com);716701 tm->tm_wday = 0;717702 tm->tm_yday = 0;718703 tm->tm_isdst = 0;719719- if (rtc_data.rc) {704704+ if (rc) {720705 tm->tm_sec = 0;721706 tm->tm_min = 0;722707 tm->tm_hour = 0;723708 tm->tm_mday = 15;724709 tm->tm_mon = 5;725710 tm->tm_year = 52;726726- return rtc_data.rc;711711+ return rc;727712 }728713729729- if ((rtc_data.ce_msg.ce_msg[2] == 0xa9) ||730730- (rtc_data.ce_msg.ce_msg[2] == 0xaf)) {714714+ if ((ce_msg[2] == 0xa9) ||715715+ (ce_msg[2] == 0xaf)) {731716 /* TOD clock is not set */732717 tm->tm_sec = 1;733718 tm->tm_min = 1;···725736 mf_set_rtc(tm);726737 }727738 {728728- u8 *ce_msg = rtc_data.ce_msg.ce_msg;729739 u8 year = ce_msg[5];730740 u8 sec = ce_msg[6];731741 u8 min = ce_msg[7];···751763 }752764753765 return 0;766766+}767767+768768+int mf_get_rtc(struct rtc_time *tm)769769+{770770+ struct ce_msg_comp_data ce_complete;771771+ struct rtc_time_data rtc_data;772772+ int rc;773773+774774+ memset(&ce_complete, 0, sizeof(ce_complete));775775+ memset(&rtc_data, 0, sizeof(rtc_data));776776+ init_completion(&rtc_data.com);777777+ ce_complete.handler = &get_rtc_time_complete;778778+ ce_complete.token = &rtc_data;779779+ rc = signal_ce_msg_simple(0x40, &ce_complete);780780+ if (rc)781781+ return rc;782782+ wait_for_completion(&rtc_data.com);783783+ return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm);784784+}785785+786786+struct boot_rtc_time_data {787787+ int busy;788788+ struct ce_msg_data ce_msg;789789+ int rc;790790+};791791+792792+static void get_boot_rtc_time_complete(void *token, struct ce_msg_data *ce_msg)793793+{794794+ struct boot_rtc_time_data *rtc = token;795795+796796+ memcpy(&rtc->ce_msg, ce_msg, sizeof(rtc->ce_msg));797797+ rtc->rc = 0;798798+ rtc->busy = 0;799799+}800800+801801+int mf_get_boot_rtc(struct rtc_time *tm)802802+{803803+ struct ce_msg_comp_data ce_complete;804804+ struct boot_rtc_time_data rtc_data;805805+ int rc;806806+807807+ memset(&ce_complete, 0, sizeof(ce_complete));808808+ memset(&rtc_data, 0, sizeof(rtc_data));809809+ rtc_data.busy = 1;810810+ ce_complete.handler = &get_boot_rtc_time_complete;811811+ ce_complete.token = &rtc_data;812812+ rc = signal_ce_msg_simple(0x40, &ce_complete);813813+ if (rc)814814+ return rc;815815+ /* We need to poll here as we are not yet taking interrupts */816816+ while (rtc_data.busy) {817817+ extern unsigned long lpevent_count;818818+ struct ItLpQueue *lpq = get_paca()->lpqueue_ptr;819819+ if (lpq && ItLpQueue_isLpIntPending(lpq))820820+ lpevent_count += ItLpQueue_process(lpq, NULL);821821+ }822822+ return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm);754823}755824756825int mf_set_rtc(struct rtc_time *tm)
+1-38
arch/ppc64/kernel/rtc.c
···292292293293void iSeries_get_boot_time(struct rtc_time *tm)294294{295295- unsigned long time;296296- static unsigned long lastsec = 1;297297-298298- u32 dataWord1 = *((u32 *)(&xSpCommArea.xBcdTimeAtIplStart));299299- u32 dataWord2 = *(((u32 *)&(xSpCommArea.xBcdTimeAtIplStart)) + 1);300300- int year = 1970;301301- int year1 = ( dataWord1 >> 24 ) & 0x000000FF;302302- int year2 = ( dataWord1 >> 16 ) & 0x000000FF;303303- int sec = ( dataWord1 >> 8 ) & 0x000000FF;304304- int min = dataWord1 & 0x000000FF;305305- int hour = ( dataWord2 >> 24 ) & 0x000000FF;306306- int day = ( dataWord2 >> 8 ) & 0x000000FF;307307- int mon = dataWord2 & 0x000000FF;308308-309295 if ( piranha_simulator )310296 return;311297312312- BCD_TO_BIN(sec);313313- BCD_TO_BIN(min);314314- BCD_TO_BIN(hour);315315- BCD_TO_BIN(day);316316- BCD_TO_BIN(mon);317317- BCD_TO_BIN(year1);318318- BCD_TO_BIN(year2);319319- year = year1 * 100 + year2;320320-321321- time = mktime(year, mon, day, hour, min, sec);322322- time += ( jiffies / HZ );323323-324324- /* Now THIS is a nasty hack!325325- * It ensures that the first two calls get different answers. 326326- * That way the loop in init_time (time.c) will not think327327- * the clock is stuck.328328- */329329- if ( lastsec ) {330330- time -= lastsec;331331- --lastsec;332332- }333333-334334- to_tm(time, tm); 335335- tm->tm_year -= 1900;298298+ mf_get_boot_rtc(tm);336299 tm->tm_mon -= 1;337300}338301#endif
···386386 if (instance->u.atm_dev->signal != ATM_PHY_SIG_LOST) {387387 instance->u.atm_dev->signal = ATM_PHY_SIG_LOST;388388 printk(KERN_NOTICE "ADSL line is down\n");389389+ /* It'll never resync again unless we ask it to... */390390+ speedtch_start_synchro(instance);389391 }390392 break;391393
+1
include/asm-ppc64/iSeries/mf.h
···5252extern void mf_init(void);53535454extern int mf_get_rtc(struct rtc_time *tm);5555+extern int mf_get_boot_rtc(struct rtc_time *tm);5556extern int mf_set_rtc(struct rtc_time *tm);56575758#endif /* _ASM_PPC64_ISERIES_MF_H */
+10-1
kernel/signal.c
···522522{523523 int sig = 0;524524525525- sig = next_signal(pending, mask);525525+ /* SIGKILL must have priority, otherwise it is quite easy526526+ * to create an unkillable process, sending sig < SIGKILL527527+ * to self */528528+ if (unlikely(sigismember(&pending->signal, SIGKILL))) {529529+ if (!sigismember(mask, SIGKILL))530530+ sig = SIGKILL;531531+ }532532+533533+ if (likely(!sig))534534+ sig = next_signal(pending, mask);526535 if (sig) {527536 if (current->notifier) {528537 if (sigismember(current->notifier_mask, sig)) {