···33 *44 * Creates entries in /proc/sal for various system features.55 *66- * Copyright (c) 2003 Silicon Graphics, Inc. All rights reserved.66+ * Copyright (c) 2003, 2006 Silicon Graphics, Inc. All rights reserved.77 * Copyright (c) 2003 Hewlett-Packard Co88 * Bjorn Helgaas <bjorn.helgaas@hp.com>99 *···2727 * mca.c may not pass a buffer, a NULL buffer just indicates that a new2828 * record is available in SAL.2929 * Replace some NR_CPUS by cpus_online, for hotplug cpu.3030+ *3131+ * Jan 5 2006 kaos@sgi.com3232+ * Handle hotplug cpus coming online.3333+ * Handle hotplug cpus going offline while they still have outstanding records.3434+ * Use the cpu_* macros consistently.3535+ * Replace the counting semaphore with a mutex and a test if the cpumask is non-empty.3636+ * Modify the locking to make the test for "work to do" an atomic operation.3037 */31383239#include <linux/capability.h>4040+#include <linux/cpu.h>3341#include <linux/types.h>3442#include <linux/proc_fs.h>3543#include <linux/module.h>···140132};141133142134struct salinfo_data {143143- volatile cpumask_t cpu_event; /* which cpus have outstanding events */144144- struct semaphore sem; /* count of cpus with outstanding events (bits set in cpu_event) */135135+ cpumask_t cpu_event; /* which cpus have outstanding events */136136+ struct semaphore mutex;145137 u8 *log_buffer;146138 u64 log_size;147139 u8 *oemdata; /* decoded oem data */···182174 int ret;183175};184176177177+/* Kick the mutex that tells user space that there is work to do. Instead of178178+ * trying to track the state of the mutex across multiple cpus, in user179179+ * context, interrupt context, non-maskable interrupt context and hotplug cpu,180180+ * it is far easier just to grab the mutex if it is free then release it.181181+ *182182+ * This routine must be called with data_saved_lock held, to make the down/up183183+ * operation atomic.184184+ */185185+static void186186+salinfo_work_to_do(struct salinfo_data *data)187187+{188188+ down_trylock(&data->mutex);189189+ up(&data->mutex);190190+}191191+185192static void186193salinfo_platform_oemdata_cpu(void *context)187194{···235212236213 BUG_ON(type >= ARRAY_SIZE(salinfo_log_name));237214215215+ if (irqsafe)216216+ spin_lock_irqsave(&data_saved_lock, flags);238217 if (buffer) {239239- if (irqsafe)240240- spin_lock_irqsave(&data_saved_lock, flags);241218 for (i = 0, data_saved = data->data_saved; i < saved_size; ++i, ++data_saved) {242219 if (!data_saved->buffer)243220 break;···255232 data_saved->size = size;256233 data_saved->buffer = buffer;257234 }258258- if (irqsafe)259259- spin_unlock_irqrestore(&data_saved_lock, flags);260235 }261261-262262- if (!test_and_set_bit(smp_processor_id(), &data->cpu_event)) {263263- if (irqsafe)264264- up(&data->sem);236236+ cpu_set(smp_processor_id(), data->cpu_event);237237+ if (irqsafe) {238238+ salinfo_work_to_do(data);239239+ spin_unlock_irqrestore(&data_saved_lock, flags);265240 }266241}267242···270249static void271250salinfo_timeout_check(struct salinfo_data *data)272251{273273- int i;252252+ unsigned long flags;274253 if (!data->open)275254 return;276276- for_each_online_cpu(i) {277277- if (test_bit(i, &data->cpu_event)) {278278- /* double up() is not a problem, user space will see no279279- * records for the additional "events".280280- */281281- up(&data->sem);282282- }255255+ if (!cpus_empty(data->cpu_event)) {256256+ spin_lock_irqsave(&data_saved_lock, flags);257257+ salinfo_work_to_do(data);258258+ spin_unlock_irqrestore(&data_saved_lock, flags);283259 }284260}285261286286-static void 262262+static void287263salinfo_timeout (unsigned long arg)288264{289265 salinfo_timeout_check(salinfo_data + SAL_INFO_TYPE_MCA);···308290 int i, n, cpu = -1;309291310292retry:311311- if (down_trylock(&data->sem)) {293293+ if (cpus_empty(data->cpu_event) && down_trylock(&data->mutex)) {312294 if (file->f_flags & O_NONBLOCK)313295 return -EAGAIN;314314- if (down_interruptible(&data->sem))296296+ if (down_interruptible(&data->mutex))315297 return -EINTR;316298 }317299318300 n = data->cpu_check;319301 for (i = 0; i < NR_CPUS; i++) {320320- if (test_bit(n, &data->cpu_event) && cpu_online(n)) {302302+ if (cpu_isset(n, data->cpu_event)) {303303+ if (!cpu_online(n)) {304304+ cpu_clear(n, data->cpu_event);305305+ continue;306306+ }321307 cpu = n;322308 break;323309 }···331309332310 if (cpu == -1)333311 goto retry;334334-335335- /* events are sticky until the user says "clear" */336336- up(&data->sem);337312338313 /* for next read, start checking at next CPU */339314 data->cpu_check = cpu;···400381static void401382call_on_cpu(int cpu, void (*fn)(void *), void *arg)402383{403403- cpumask_t save_cpus_allowed, new_cpus_allowed;404404- memcpy(&save_cpus_allowed, ¤t->cpus_allowed, sizeof(save_cpus_allowed));405405- memset(&new_cpus_allowed, 0, sizeof(new_cpus_allowed));406406- set_bit(cpu, &new_cpus_allowed);384384+ cpumask_t save_cpus_allowed = current->cpus_allowed;385385+ cpumask_t new_cpus_allowed = cpumask_of_cpu(cpu);407386 set_cpus_allowed(current, new_cpus_allowed);408387 (*fn)(arg);409388 set_cpus_allowed(current, save_cpus_allowed);···450433 if (!data->saved_num)451434 call_on_cpu(cpu, salinfo_log_read_cpu, data);452435 if (!data->log_size) {453453- data->state = STATE_NO_DATA;454454- clear_bit(cpu, &data->cpu_event);436436+ data->state = STATE_NO_DATA;437437+ cpu_clear(cpu, data->cpu_event);455438 } else {456456- data->state = STATE_LOG_RECORD;439439+ data->state = STATE_LOG_RECORD;457440 }458441}459442···490473salinfo_log_clear(struct salinfo_data *data, int cpu)491474{492475 sal_log_record_header_t *rh;476476+ unsigned long flags;477477+ spin_lock_irqsave(&data_saved_lock, flags);493478 data->state = STATE_NO_DATA;494494- if (!test_bit(cpu, &data->cpu_event))495495- return 0;496496- down(&data->sem);497497- clear_bit(cpu, &data->cpu_event);498498- if (data->saved_num) {499499- unsigned long flags;500500- spin_lock_irqsave(&data_saved_lock, flags);501501- shift1_data_saved(data, data->saved_num - 1 );502502- data->saved_num = 0;479479+ if (!cpu_isset(cpu, data->cpu_event)) {503480 spin_unlock_irqrestore(&data_saved_lock, flags);481481+ return 0;504482 }483483+ cpu_clear(cpu, data->cpu_event);484484+ if (data->saved_num) {485485+ shift1_data_saved(data, data->saved_num - 1);486486+ data->saved_num = 0;487487+ }488488+ spin_unlock_irqrestore(&data_saved_lock, flags);505489 rh = (sal_log_record_header_t *)(data->log_buffer);506490 /* Corrected errors have already been cleared from SAL */507491 if (rh->severity != sal_log_severity_corrected)508492 call_on_cpu(cpu, salinfo_log_clear_cpu, data);509493 /* clearing a record may make a new record visible */510494 salinfo_log_new_read(cpu, data);511511- if (data->state == STATE_LOG_RECORD &&512512- !test_and_set_bit(cpu, &data->cpu_event))513513- up(&data->sem);495495+ if (data->state == STATE_LOG_RECORD) {496496+ spin_lock_irqsave(&data_saved_lock, flags);497497+ cpu_set(cpu, data->cpu_event);498498+ salinfo_work_to_do(data);499499+ spin_unlock_irqrestore(&data_saved_lock, flags);500500+ }514501 return 0;515502}516503···571550 .write = salinfo_log_write,572551};573552553553+#ifdef CONFIG_HOTPLUG_CPU554554+static int __devinit555555+salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)556556+{557557+ unsigned int i, cpu = (unsigned long)hcpu;558558+ unsigned long flags;559559+ struct salinfo_data *data;560560+ switch (action) {561561+ case CPU_ONLINE:562562+ spin_lock_irqsave(&data_saved_lock, flags);563563+ for (i = 0, data = salinfo_data;564564+ i < ARRAY_SIZE(salinfo_data);565565+ ++i, ++data) {566566+ cpu_set(cpu, data->cpu_event);567567+ salinfo_work_to_do(data);568568+ }569569+ spin_unlock_irqrestore(&data_saved_lock, flags);570570+ break;571571+ case CPU_DEAD:572572+ spin_lock_irqsave(&data_saved_lock, flags);573573+ for (i = 0, data = salinfo_data;574574+ i < ARRAY_SIZE(salinfo_data);575575+ ++i, ++data) {576576+ struct salinfo_data_saved *data_saved;577577+ int j;578578+ for (j = ARRAY_SIZE(data->data_saved) - 1, data_saved = data->data_saved + j;579579+ j >= 0;580580+ --j, --data_saved) {581581+ if (data_saved->buffer && data_saved->cpu == cpu) {582582+ shift1_data_saved(data, j);583583+ }584584+ }585585+ cpu_clear(cpu, data->cpu_event);586586+ }587587+ spin_unlock_irqrestore(&data_saved_lock, flags);588588+ break;589589+ }590590+ return NOTIFY_OK;591591+}592592+593593+static struct notifier_block salinfo_cpu_notifier =594594+{595595+ .notifier_call = salinfo_cpu_callback,596596+ .priority = 0,597597+};598598+#endif /* CONFIG_HOTPLUG_CPU */599599+574600static int __init575601salinfo_init(void)576602{···625557 struct proc_dir_entry **sdir = salinfo_proc_entries; /* keeps track of every entry */626558 struct proc_dir_entry *dir, *entry;627559 struct salinfo_data *data;628628- int i, j, online;560560+ int i, j;629561630562 salinfo_dir = proc_mkdir("sal", NULL);631563 if (!salinfo_dir)···640572 for (i = 0; i < ARRAY_SIZE(salinfo_log_name); i++) {641573 data = salinfo_data + i;642574 data->type = i;643643- sema_init(&data->sem, 0);575575+ init_MUTEX(&data->mutex);644576 dir = proc_mkdir(salinfo_log_name[i], salinfo_dir);645577 if (!dir)646578 continue;···660592 *sdir++ = entry;661593662594 /* we missed any events before now */663663- online = 0;664664- for_each_online_cpu(j) {665665- set_bit(j, &data->cpu_event);666666- ++online;667667- }668668- sema_init(&data->sem, online);595595+ for_each_online_cpu(j)596596+ cpu_set(j, data->cpu_event);669597670598 *sdir++ = dir;671599 }···672608 salinfo_timer.expires = jiffies + SALINFO_TIMER_DELAY;673609 salinfo_timer.function = &salinfo_timeout;674610 add_timer(&salinfo_timer);611611+612612+#ifdef CONFIG_HOTPLUG_CPU613613+ register_cpu_notifier(&salinfo_cpu_notifier);614614+#endif675615676616 return 0;677617}
+19-7
arch/ia64/kernel/traps.c
···530530 if (fsys_mode(current, ®s)) {531531 extern char __kernel_syscall_via_break[];532532 /*533533- * Got a trap in fsys-mode: Taken Branch Trap and Single Step trap534534- * need special handling; Debug trap is not supposed to happen.533533+ * Got a trap in fsys-mode: Taken Branch Trap534534+ * and Single Step trap need special handling;535535+ * Debug trap is ignored (we disable it here536536+ * and re-enable it in the lower-privilege trap).535537 */536538 if (unlikely(vector == 29)) {537537- die("Got debug trap in fsys-mode---not supposed to happen!",538538- ®s, 0);539539+ set_thread_flag(TIF_DB_DISABLED);540540+ ia64_psr(®s)->db = 0;541541+ ia64_psr(®s)->lp = 1;539542 return;540543 }541544 /* re-do the system call via break 0x100000: */···592589 case 34:593590 if (isr & 0x2) {594591 /* Lower-Privilege Transfer Trap */592592+593593+ /* If we disabled debug traps during an fsyscall,594594+ * re-enable them here.595595+ */596596+ if (test_thread_flag(TIF_DB_DISABLED)) {597597+ clear_thread_flag(TIF_DB_DISABLED);598598+ ia64_psr(®s)->db = 1;599599+ }600600+595601 /*596596- * Just clear PSR.lp and then return immediately: all the597597- * interesting work (e.g., signal delivery is done in the kernel598598- * exit path).602602+ * Just clear PSR.lp and then return immediately:603603+ * all the interesting work (e.g., signal delivery)604604+ * is done in the kernel exit path.599605 */600606 ia64_psr(®s)->lp = 0;601607 return;
+1-1
arch/ia64/mm/tlb.c
···9090{9191 static DEFINE_SPINLOCK(ptcg_lock);92929393- if (mm != current->active_mm) {9393+ if (mm != current->active_mm || !current->mm) {9494 flush_tlb_all();9595 return;9696 }
+12-4
arch/ia64/sn/include/xtalk/hubdev.h
···2626#define IIO_NUM_ITTES 72727#define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1)28282929-struct sn_flush_device_list {2929+/* This struct is shared between the PROM and the kernel.3030+ * Changes to this struct will require corresponding changes to the kernel.3131+ */3232+struct sn_flush_device_common {3033 int sfdl_bus;3134 int sfdl_slot;3235 int sfdl_pin;3333- struct bar_list {3636+ struct common_bar_list {3437 unsigned long start;3538 unsigned long end;3639 } sfdl_bar_list[6];···4340 uint32_t sfdl_persistent_busnum;4441 uint32_t sfdl_persistent_segment;4542 struct pcibus_info *sfdl_pcibus_info;4343+};4444+4545+/* This struct is kernel only and is not used by the PROM */4646+struct sn_flush_device_kernel {4647 spinlock_t sfdl_flush_lock;4848+ struct sn_flush_device_common *common;4749};48504951/*5050- * **widget_p - Used as an array[wid_num][device] of sn_flush_device_list.5252+ * **widget_p - Used as an array[wid_num][device] of sn_flush_device_kernel.5153 */5254struct sn_flush_nasid_entry {5353- struct sn_flush_device_list **widget_p; /* Used as a array of wid_num */5555+ struct sn_flush_device_kernel **widget_p; // Used as an array of wid_num5456 uint64_t iio_itte[8];5557};5658
+48-10
arch/ia64/sn/kernel/bte_error.c
···3333 * Wait until all BTE related CRBs are completed3434 * and then reset the interfaces.3535 */3636-void shub1_bte_error_handler(unsigned long _nodepda)3636+int shub1_bte_error_handler(unsigned long _nodepda)3737{3838 struct nodepda_s *err_nodepda = (struct nodepda_s *)_nodepda;3939 struct timer_list *recovery_timer = &err_nodepda->bte_recovery_timer;···5353 (err_nodepda->bte_if[1].bh_error == BTE_SUCCESS)) {5454 BTE_PRINTK(("eh:%p:%d Nothing to do.\n", err_nodepda,5555 smp_processor_id()));5656- return;5656+ return 1;5757 }58585959 /* Determine information about our hub */···8181 mod_timer(recovery_timer, HZ * 5);8282 BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda,8383 smp_processor_id()));8484- return;8484+ return 1;8585 }8686 if (icmr.ii_icmr_fld_s.i_crb_vld != 0) {8787···9999 BTE_PRINTK(("eh:%p:%d Valid %d, Giving up\n",100100 err_nodepda, smp_processor_id(),101101 i));102102- return;102102+ return 1;103103 }104104 }105105 }···124124 REMOTE_HUB_S(nasid, IIO_IBCR, ibcr.ii_ibcr_regval);125125126126 del_timer(recovery_timer);127127+ return 0;128128+}129129+130130+/*131131+ * Wait until all BTE related CRBs are completed132132+ * and then reset the interfaces.133133+ */134134+int shub2_bte_error_handler(unsigned long _nodepda)135135+{136136+ struct nodepda_s *err_nodepda = (struct nodepda_s *)_nodepda;137137+ struct timer_list *recovery_timer = &err_nodepda->bte_recovery_timer;138138+ struct bteinfo_s *bte;139139+ nasid_t nasid;140140+ u64 status;141141+ int i;142142+143143+ nasid = cnodeid_to_nasid(err_nodepda->bte_if[0].bte_cnode);144144+145145+ /*146146+ * Verify that all the BTEs are complete147147+ */148148+ for (i = 0; i < BTES_PER_NODE; i++) {149149+ bte = &err_nodepda->bte_if[i];150150+ status = BTE_LNSTAT_LOAD(bte);151151+ if ((status & IBLS_ERROR) || !(status & IBLS_BUSY))152152+ continue;153153+ mod_timer(recovery_timer, HZ * 5);154154+ BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda,155155+ smp_processor_id()));156156+ return 1;157157+ }158158+ if (ia64_sn_bte_recovery(nasid))159159+ panic("bte_error_handler(): Fatal BTE Error");160160+161161+ del_timer(recovery_timer);162162+ return 0;127163}128164129165/*···171135 struct nodepda_s *err_nodepda = (struct nodepda_s *)_nodepda;172136 spinlock_t *recovery_lock = &err_nodepda->bte_recovery_lock;173137 int i;174174- nasid_t nasid;175138 unsigned long irq_flags;176139 volatile u64 *notify;177140 bte_result_t bh_error;···195160 }196161197162 if (is_shub1()) {198198- shub1_bte_error_handler(_nodepda);163163+ if (shub1_bte_error_handler(_nodepda)) {164164+ spin_unlock_irqrestore(recovery_lock, irq_flags);165165+ return;166166+ }199167 } else {200200- nasid = cnodeid_to_nasid(err_nodepda->bte_if[0].bte_cnode);201201-202202- if (ia64_sn_bte_recovery(nasid))203203- panic("bte_error_handler(): Fatal BTE Error");168168+ if (shub2_bte_error_handler(_nodepda)) {169169+ spin_unlock_irqrestore(recovery_lock, irq_flags);170170+ return;171171+ }204172 }205173206174 for (i = 0; i < BTES_PER_NODE; i++) {
+6-5
arch/ia64/sn/kernel/huberror.c
···3232 ret_stuff.v0 = 0;3333 hubdev_info = (struct hubdev_info *)arg;3434 nasid = hubdev_info->hdi_nasid;3535- SAL_CALL_NOLOCK(ret_stuff, SN_SAL_HUB_ERROR_INTERRUPT,3636- (u64) nasid, 0, 0, 0, 0, 0, 0);3737-3838- if ((int)ret_stuff.v0)3939- panic("hubii_eint_handler(): Fatal TIO Error");40354136 if (is_shub1()) {3737+ SAL_CALL_NOLOCK(ret_stuff, SN_SAL_HUB_ERROR_INTERRUPT,3838+ (u64) nasid, 0, 0, 0, 0, 0, 0);3939+4040+ if ((int)ret_stuff.v0)4141+ panic("hubii_eint_handler(): Fatal TIO Error");4242+4243 if (!(nasid & 1)) /* Not a TIO, handle CRB errors */4344 (void)hubiio_crb_error_handler(hubdev_info);4445 } else
+52-40
arch/ia64/sn/kernel/io_init.c
···7676};77777878/*7979- * Retrieve the DMA Flush List given nasid. This list is needed 8080- * to implement the WAR - Flush DMA data on PIO Reads.7979+ * Retrieve the DMA Flush List given nasid, widget, and device.8080+ * This list is needed to implement the WAR - Flush DMA data on PIO Reads.8181 */8282-static inline uint64_t8383-sal_get_widget_dmaflush_list(u64 nasid, u64 widget_num, u64 address)8282+static inline u648383+sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num,8484+ u64 address)8485{85868687 struct ia64_sal_retval ret_stuff;···8988 ret_stuff.v0 = 0;90899190 SAL_CALL_NOLOCK(ret_stuff,9292- (u64) SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST,9393- (u64) nasid, (u64) widget_num, (u64) address, 0, 0, 0,9494- 0);9595- return ret_stuff.v0;9191+ (u64) SN_SAL_IOIF_GET_DEVICE_DMAFLUSH_LIST,9292+ (u64) nasid, (u64) widget_num,9393+ (u64) device_num, (u64) address, 0, 0, 0);9494+ return ret_stuff.status;96959796}98979998/*10099 * Retrieve the hub device info structure for the given nasid.101100 */102102-static inline uint64_t sal_get_hubdev_info(u64 handle, u64 address)101101+static inline u64 sal_get_hubdev_info(u64 handle, u64 address)103102{104103105104 struct ia64_sal_retval ret_stuff;···115114/*116115 * Retrieve the pci bus information given the bus number.117116 */118118-static inline uint64_t sal_get_pcibus_info(u64 segment, u64 busnum, u64 address)117117+static inline u64 sal_get_pcibus_info(u64 segment, u64 busnum, u64 address)119118{120119121120 struct ia64_sal_retval ret_stuff;···131130/*132131 * Retrieve the pci device information given the bus and device|function number.133132 */134134-static inline uint64_t133133+static inline u64135134sal_get_pcidev_info(u64 segment, u64 bus_number, u64 devfn, u64 pci_dev, 136135 u64 sn_irq_info)137136{···171170 */172171static void sn_fixup_ionodes(void)173172{174174-175175- struct sn_flush_device_list *sn_flush_device_list;173173+ struct sn_flush_device_kernel *sn_flush_device_kernel;174174+ struct sn_flush_device_kernel *dev_entry;176175 struct hubdev_info *hubdev;177177- uint64_t status;178178- uint64_t nasid;179179- int i, widget;176176+ u64 status;177177+ u64 nasid;178178+ int i, widget, device;180179181180 /*182181 * Get SGI Specific HUB chipset information.···187186 nasid = cnodeid_to_nasid(i);188187 hubdev->max_segment_number = 0xffffffff;189188 hubdev->max_pcibus_number = 0xff;190190- status = sal_get_hubdev_info(nasid, (uint64_t) __pa(hubdev));189189+ status = sal_get_hubdev_info(nasid, (u64) __pa(hubdev));191190 if (status)192191 continue;193192···214213215214 hubdev->hdi_flush_nasid_list.widget_p =216215 kmalloc((HUB_WIDGET_ID_MAX + 1) *217217- sizeof(struct sn_flush_device_list *), GFP_KERNEL);218218-216216+ sizeof(struct sn_flush_device_kernel *),217217+ GFP_KERNEL);219218 memset(hubdev->hdi_flush_nasid_list.widget_p, 0x0,220219 (HUB_WIDGET_ID_MAX + 1) *221221- sizeof(struct sn_flush_device_list *));220220+ sizeof(struct sn_flush_device_kernel *));222221223222 for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) {224224- sn_flush_device_list = kmalloc(DEV_PER_WIDGET *225225- sizeof(struct226226- sn_flush_device_list),227227- GFP_KERNEL);228228- memset(sn_flush_device_list, 0x0,223223+ sn_flush_device_kernel = kmalloc(DEV_PER_WIDGET *224224+ sizeof(struct225225+ sn_flush_device_kernel),226226+ GFP_KERNEL);227227+ if (!sn_flush_device_kernel)228228+ BUG();229229+ memset(sn_flush_device_kernel, 0x0,229230 DEV_PER_WIDGET *230230- sizeof(struct sn_flush_device_list));231231+ sizeof(struct sn_flush_device_kernel));231232232232- status =233233- sal_get_widget_dmaflush_list(nasid, widget,234234- (uint64_t)235235- __pa236236- (sn_flush_device_list));237237- if (status) {238238- kfree(sn_flush_device_list);239239- continue;233233+ dev_entry = sn_flush_device_kernel;234234+ for (device = 0; device < DEV_PER_WIDGET;235235+ device++,dev_entry++) {236236+ dev_entry->common = kmalloc(sizeof(struct237237+ sn_flush_device_common),238238+ GFP_KERNEL);239239+ if (!dev_entry->common)240240+ BUG();241241+ memset(dev_entry->common, 0x0, sizeof(struct242242+ sn_flush_device_common));243243+244244+ status = sal_get_device_dmaflush_list(nasid,245245+ widget,246246+ device,247247+ (u64)(dev_entry->common));248248+ if (status)249249+ BUG();250250+251251+ spin_lock_init(&dev_entry->sfdl_flush_lock);240252 }241253242242- spin_lock_init(&sn_flush_device_list->sfdl_flush_lock);243243- hubdev->hdi_flush_nasid_list.widget_p[widget] =244244- sn_flush_device_list;245245- }246246-254254+ if (sn_flush_device_kernel)255255+ hubdev->hdi_flush_nasid_list.widget_p[widget] =256256+ sn_flush_device_kernel;257257+ }247258 }248248-249259}250260251261/*
···33 * License. See the file "COPYING" in the main directory of this archive44 * for more details.55 *66- * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved.66+ * Copyright (c) 2004-2006 Silicon Graphics, Inc. All Rights Reserved.77 */8899···1111 * Cross Partition Communication (XPC) structures and macros.1212 */13131414-#ifndef _IA64_SN_KERNEL_XPC_H1515-#define _IA64_SN_KERNEL_XPC_H1414+#ifndef _ASM_IA64_SN_XPC_H1515+#define _ASM_IA64_SN_XPC_H161617171818#include <linux/config.h>···663663extern struct device *xpc_part;664664extern struct device *xpc_chan;665665extern int xpc_disengage_request_timelimit;666666+extern int xpc_disengage_request_timedout;666667extern irqreturn_t xpc_notify_IRQ_handler(int, void *, struct pt_regs *);667668extern void xpc_dropped_IPI_check(struct xpc_partition *);668669extern void xpc_activate_partition(struct xpc_partition *);···708707extern void xpc_deliver_msg(struct xpc_channel *);709708extern void xpc_disconnect_channel(const int, struct xpc_channel *,710709 enum xpc_retval, unsigned long *);711711-extern void xpc_disconnecting_callout(struct xpc_channel *);710710+extern void xpc_disconnect_callout(struct xpc_channel *, enum xpc_retval);712711extern void xpc_partition_going_down(struct xpc_partition *, enum xpc_retval);713712extern void xpc_teardown_infrastructure(struct xpc_partition *);714713···12701269}127112701272127112731273-#endif /* _IA64_SN_KERNEL_XPC_H */12721272+#endif /* _ASM_IA64_SN_XPC_H */12741273
+14-10
arch/ia64/sn/kernel/xpc_channel.c
···33 * License. See the file "COPYING" in the main directory of this archive44 * for more details.55 *66- * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved.66+ * Copyright (c) 2004-2006 Silicon Graphics, Inc. All Rights Reserved.77 */8899···2424#include <linux/slab.h>2525#include <asm/sn/bte.h>2626#include <asm/sn/sn_sal.h>2727-#include "xpc.h"2727+#include <asm/sn/xpc.h>282829293030/*···778778 }779779780780 /* both sides are disconnected now */781781+782782+ if (ch->flags & XPC_C_CONNECTCALLOUT) {783783+ spin_unlock_irqrestore(&ch->lock, *irq_flags);784784+ xpc_disconnect_callout(ch, xpcDisconnected);785785+ spin_lock_irqsave(&ch->lock, *irq_flags);786786+ }781787782788 /* it's now safe to free the channel's message queues */783789 xpc_free_msgqueues(ch);···165116451652164616531647void16541654-xpc_disconnecting_callout(struct xpc_channel *ch)16481648+xpc_disconnect_callout(struct xpc_channel *ch, enum xpc_retval reason)16551649{16561650 /*16571651 * Let the channel's registerer know that the channel is being···16601654 */1661165516621656 if (ch->func != NULL) {16631663- dev_dbg(xpc_chan, "ch->func() called, reason=xpcDisconnecting,"16641664- " partid=%d, channel=%d\n", ch->partid, ch->number);16571657+ dev_dbg(xpc_chan, "ch->func() called, reason=%d, partid=%d, "16581658+ "channel=%d\n", reason, ch->partid, ch->number);1665165916661666- ch->func(xpcDisconnecting, ch->partid, ch->number, NULL,16671667- ch->key);16601660+ ch->func(reason, ch->partid, ch->number, NULL, ch->key);1668166116691669- dev_dbg(xpc_chan, "ch->func() returned, reason="16701670- "xpcDisconnecting, partid=%d, channel=%d\n",16711671- ch->partid, ch->number);16621662+ dev_dbg(xpc_chan, "ch->func() returned, reason=%d, partid=%d, "16631663+ "channel=%d\n", reason, ch->partid, ch->number);16721664 }16731665}16741666
+148-79
arch/ia64/sn/kernel/xpc_main.c
···33 * License. See the file "COPYING" in the main directory of this archive44 * for more details.55 *66- * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved.66+ * Copyright (c) 2004-2006 Silicon Graphics, Inc. All Rights Reserved.77 */8899···5959#include <asm/sn/sn_sal.h>6060#include <asm/kdebug.h>6161#include <asm/uaccess.h>6262-#include "xpc.h"6262+#include <asm/sn/xpc.h>636364646565/* define two XPC debug device structures to be used with dev_dbg() et al */···80808181struct device *xpc_part = &xpc_part_dbg_subname;8282struct device *xpc_chan = &xpc_chan_dbg_subname;8383+8484+8585+static int xpc_kdebug_ignore;838684878588/* systune related variables for /proc/sys directories */···165162};166163static struct ctl_table_header *xpc_sysctl;167164165165+/* non-zero if any remote partition disengage request was timed out */166166+int xpc_disengage_request_timedout;168167169168/* #of IRQs received */170169static atomic_t xpc_act_IRQ_rcvd;···778773 ch->flags |= XPC_C_DISCONNECTCALLOUT;779774 spin_unlock_irqrestore(&ch->lock, irq_flags);780775781781- xpc_disconnecting_callout(ch);776776+ xpc_disconnect_callout(ch, xpcDisconnecting);782777 } else {783778 spin_unlock_irqrestore(&ch->lock, irq_flags);784779 }···926921xpc_do_exit(enum xpc_retval reason)927922{928923 partid_t partid;929929- int active_part_count;924924+ int active_part_count, printed_waiting_msg = 0;930925 struct xpc_partition *part;931931- unsigned long printmsg_time;926926+ unsigned long printmsg_time, disengage_request_timeout = 0;932927933928934929 /* a 'rmmod XPC' and a 'reboot' cannot both end up here together */···958953959954 /* wait for all partitions to become inactive */960955961961- printmsg_time = jiffies;956956+ printmsg_time = jiffies + (XPC_DISENGAGE_PRINTMSG_INTERVAL * HZ);957957+ xpc_disengage_request_timedout = 0;962958963959 do {964960 active_part_count = 0;···975969 active_part_count++;976970977971 XPC_DEACTIVATE_PARTITION(part, reason);972972+973973+ if (part->disengage_request_timeout >974974+ disengage_request_timeout) {975975+ disengage_request_timeout =976976+ part->disengage_request_timeout;977977+ }978978 }979979980980- if (active_part_count == 0) {981981- break;982982- }983983-984984- if (jiffies >= printmsg_time) {985985- dev_info(xpc_part, "waiting for partitions to "986986- "deactivate/disengage, active count=%d, remote "987987- "engaged=0x%lx\n", active_part_count,988988- xpc_partition_engaged(1UL << partid));989989-990990- printmsg_time = jiffies +980980+ if (xpc_partition_engaged(-1UL)) {981981+ if (time_after(jiffies, printmsg_time)) {982982+ dev_info(xpc_part, "waiting for remote "983983+ "partitions to disengage, timeout in "984984+ "%ld seconds\n",985985+ (disengage_request_timeout - jiffies)986986+ / HZ);987987+ printmsg_time = jiffies +991988 (XPC_DISENGAGE_PRINTMSG_INTERVAL * HZ);989989+ printed_waiting_msg = 1;990990+ }991991+992992+ } else if (active_part_count > 0) {993993+ if (printed_waiting_msg) {994994+ dev_info(xpc_part, "waiting for local partition"995995+ " to disengage\n");996996+ printed_waiting_msg = 0;997997+ }998998+999999+ } else {10001000+ if (!xpc_disengage_request_timedout) {10011001+ dev_info(xpc_part, "all partitions have "10021002+ "disengaged\n");10031003+ }10041004+ break;9921005 }99310069941007 /* sleep for a 1/3 of a second or so */···10251000 del_timer_sync(&xpc_hb_timer);10261001 DBUG_ON(xpc_vars->heartbeating_to_mask != 0);1027100210281028- /* take ourselves off of the reboot_notifier_list */10291029- (void) unregister_reboot_notifier(&xpc_reboot_notifier);10031003+ if (reason == xpcUnloading) {10041004+ /* take ourselves off of the reboot_notifier_list */10051005+ (void) unregister_reboot_notifier(&xpc_reboot_notifier);1030100610311031- /* take ourselves off of the die_notifier list */10321032- (void) unregister_die_notifier(&xpc_die_notifier);10071007+ /* take ourselves off of the die_notifier list */10081008+ (void) unregister_die_notifier(&xpc_die_notifier);10091009+ }1033101010341011 /* close down protections for IPI operations */10351012 xpc_restrict_IPI_ops();···10431016 if (xpc_sysctl) {10441017 unregister_sysctl_table(xpc_sysctl);10451018 }10461046-}10471047-10481048-10491049-/*10501050- * Called when the system is about to be either restarted or halted.10511051- */10521052-static void10531053-xpc_die_disengage(void)10541054-{10551055- struct xpc_partition *part;10561056- partid_t partid;10571057- unsigned long engaged;10581058- long time, print_time, disengage_request_timeout;10591059-10601060-10611061- /* keep xpc_hb_checker thread from doing anything (just in case) */10621062- xpc_exiting = 1;10631063-10641064- xpc_vars->heartbeating_to_mask = 0; /* indicate we're deactivated */10651065-10661066- for (partid = 1; partid < XP_MAX_PARTITIONS; partid++) {10671067- part = &xpc_partitions[partid];10681068-10691069- if (!XPC_SUPPORTS_DISENGAGE_REQUEST(part->10701070- remote_vars_version)) {10711071-10721072- /* just in case it was left set by an earlier XPC */10731073- xpc_clear_partition_engaged(1UL << partid);10741074- continue;10751075- }10761076-10771077- if (xpc_partition_engaged(1UL << partid) ||10781078- part->act_state != XPC_P_INACTIVE) {10791079- xpc_request_partition_disengage(part);10801080- xpc_mark_partition_disengaged(part);10811081- xpc_IPI_send_disengage(part);10821082- }10831083- }10841084-10851085- print_time = rtc_time();10861086- disengage_request_timeout = print_time +10871087- (xpc_disengage_request_timelimit * sn_rtc_cycles_per_second);10881088-10891089- /* wait for all other partitions to disengage from us */10901090-10911091- while ((engaged = xpc_partition_engaged(-1UL)) &&10921092- (time = rtc_time()) < disengage_request_timeout) {10931093-10941094- if (time >= print_time) {10951095- dev_info(xpc_part, "waiting for remote partitions to "10961096- "disengage, engaged=0x%lx\n", engaged);10971097- print_time = time + (XPC_DISENGAGE_PRINTMSG_INTERVAL *10981098- sn_rtc_cycles_per_second);10991099- }11001100- }11011101- dev_info(xpc_part, "finished waiting for remote partitions to "11021102- "disengage, engaged=0x%lx\n", engaged);11031019}1104102011051021···107511051076110610771107/*10781078- * This function is called when the system is being rebooted.11081108+ * Notify other partitions to disengage from all references to our memory.11091109+ */11101110+static void11111111+xpc_die_disengage(void)11121112+{11131113+ struct xpc_partition *part;11141114+ partid_t partid;11151115+ unsigned long engaged;11161116+ long time, printmsg_time, disengage_request_timeout;11171117+11181118+11191119+ /* keep xpc_hb_checker thread from doing anything (just in case) */11201120+ xpc_exiting = 1;11211121+11221122+ xpc_vars->heartbeating_to_mask = 0; /* indicate we're deactivated */11231123+11241124+ for (partid = 1; partid < XP_MAX_PARTITIONS; partid++) {11251125+ part = &xpc_partitions[partid];11261126+11271127+ if (!XPC_SUPPORTS_DISENGAGE_REQUEST(part->11281128+ remote_vars_version)) {11291129+11301130+ /* just in case it was left set by an earlier XPC */11311131+ xpc_clear_partition_engaged(1UL << partid);11321132+ continue;11331133+ }11341134+11351135+ if (xpc_partition_engaged(1UL << partid) ||11361136+ part->act_state != XPC_P_INACTIVE) {11371137+ xpc_request_partition_disengage(part);11381138+ xpc_mark_partition_disengaged(part);11391139+ xpc_IPI_send_disengage(part);11401140+ }11411141+ }11421142+11431143+ time = rtc_time();11441144+ printmsg_time = time +11451145+ (XPC_DISENGAGE_PRINTMSG_INTERVAL * sn_rtc_cycles_per_second);11461146+ disengage_request_timeout = time +11471147+ (xpc_disengage_request_timelimit * sn_rtc_cycles_per_second);11481148+11491149+ /* wait for all other partitions to disengage from us */11501150+11511151+ while (1) {11521152+ engaged = xpc_partition_engaged(-1UL);11531153+ if (!engaged) {11541154+ dev_info(xpc_part, "all partitions have disengaged\n");11551155+ break;11561156+ }11571157+11581158+ time = rtc_time();11591159+ if (time >= disengage_request_timeout) {11601160+ for (partid = 1; partid < XP_MAX_PARTITIONS; partid++) {11611161+ if (engaged & (1UL << partid)) {11621162+ dev_info(xpc_part, "disengage from "11631163+ "remote partition %d timed "11641164+ "out\n", partid);11651165+ }11661166+ }11671167+ break;11681168+ }11691169+11701170+ if (time >= printmsg_time) {11711171+ dev_info(xpc_part, "waiting for remote partitions to "11721172+ "disengage, timeout in %ld seconds\n",11731173+ (disengage_request_timeout - time) /11741174+ sn_rtc_cycles_per_second);11751175+ printmsg_time = time +11761176+ (XPC_DISENGAGE_PRINTMSG_INTERVAL *11771177+ sn_rtc_cycles_per_second);11781178+ }11791179+ }11801180+}11811181+11821182+11831183+/*11841184+ * This function is called when the system is being restarted or halted due11851185+ * to some sort of system failure. If this is the case we need to notify the11861186+ * other partitions to disengage from all references to our memory.11871187+ * This function can also be called when our heartbeater could be offlined11881188+ * for a time. In this case we need to notify other partitions to not worry11891189+ * about the lack of a heartbeat.10791190 */10801191static int10811192xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused)···11661115 case DIE_MACHINE_HALT:11671116 xpc_die_disengage();11681117 break;11181118+11191119+ case DIE_KDEBUG_ENTER:11201120+ /* Should lack of heartbeat be ignored by other partitions? */11211121+ if (!xpc_kdebug_ignore) {11221122+ break;11231123+ }11241124+ /* fall through */11691125 case DIE_MCA_MONARCH_ENTER:11701126 case DIE_INIT_MONARCH_ENTER:11711127 xpc_vars->heartbeat++;11721128 xpc_vars->heartbeat_offline = 1;11731129 break;11301130+11311131+ case DIE_KDEBUG_LEAVE:11321132+ /* Is lack of heartbeat being ignored by other partitions? */11331133+ if (!xpc_kdebug_ignore) {11341134+ break;11351135+ }11361136+ /* fall through */11741137 case DIE_MCA_MONARCH_LEAVE:11751138 case DIE_INIT_MONARCH_LEAVE:11761139 xpc_vars->heartbeat++;···14081343module_param(xpc_disengage_request_timelimit, int, 0);14091344MODULE_PARM_DESC(xpc_disengage_request_timelimit, "Number of seconds to wait "14101345 "for disengage request to complete.");13461346+13471347+module_param(xpc_kdebug_ignore, int, 0);13481348+MODULE_PARM_DESC(xpc_kdebug_ignore, "Should lack of heartbeat be ignored by "13491349+ "other partitions when dropping into kdebug.");14111350
+7-3
arch/ia64/sn/kernel/xpc_partition.c
···33 * License. See the file "COPYING" in the main directory of this archive44 * for more details.55 *66- * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved.66+ * Copyright (c) 2004-2006 Silicon Graphics, Inc. All Rights Reserved.77 */8899···2828#include <asm/sn/sn_sal.h>2929#include <asm/sn/nodepda.h>3030#include <asm/sn/addrs.h>3131-#include "xpc.h"3131+#include <asm/sn/xpc.h>323233333434/* XPC is exiting flag */···771771 }772772 }773773774774- if (!xpc_partition_disengaged(part)) {774774+ if (part->disengage_request_timeout > 0 &&775775+ !xpc_partition_disengaged(part)) {775776 /* still waiting on other side to disengage from us */776777 return;777778 }···874873 * request in a timely fashion, so assume it's dead.875874 */876875876876+ dev_info(xpc_part, "disengage from remote partition %d "877877+ "timed out\n", partid);878878+ xpc_disengage_request_timedout = 1;877879 xpc_clear_partition_engaged(1UL << partid);878880 disengaged = 1;879881 }
+18-16
arch/ia64/sn/pci/pcibr/pcibr_dma.c
···218218 uint64_t flags;219219 uint64_t itte;220220 struct hubdev_info *hubinfo;221221- volatile struct sn_flush_device_list *p;221221+ volatile struct sn_flush_device_kernel *p;222222+ volatile struct sn_flush_device_common *common;223223+222224 struct sn_flush_nasid_entry *flush_nasid_list;223225224226 if (!sn_ioif_inited)···270268 p = &flush_nasid_list->widget_p[wid_num][0];271269272270 /* find a matching BAR */273273- for (i = 0; i < DEV_PER_WIDGET; i++) {271271+ for (i = 0; i < DEV_PER_WIDGET; i++,p++) {272272+ common = p->common;274273 for (j = 0; j < PCI_ROM_RESOURCE; j++) {275275- if (p->sfdl_bar_list[j].start == 0)274274+ if (common->sfdl_bar_list[j].start == 0)276275 break;277277- if (addr >= p->sfdl_bar_list[j].start278278- && addr <= p->sfdl_bar_list[j].end)276276+ if (addr >= common->sfdl_bar_list[j].start277277+ && addr <= common->sfdl_bar_list[j].end)279278 break;280279 }281281- if (j < PCI_ROM_RESOURCE && p->sfdl_bar_list[j].start != 0)280280+ if (j < PCI_ROM_RESOURCE && common->sfdl_bar_list[j].start != 0)282281 break;283283- p++;284282 }285283286284 /* if no matching BAR, return without doing anything. */···306304 if ((1 << XWIDGET_PART_REV_NUM_REV(revnum)) & PV907516) {307305 return;308306 } else {309309- pcireg_wrb_flush_get(p->sfdl_pcibus_info,310310- (p->sfdl_slot - 1));307307+ pcireg_wrb_flush_get(common->sfdl_pcibus_info,308308+ (common->sfdl_slot - 1));311309 }312310 } else {313313- spin_lock_irqsave(&((struct sn_flush_device_list *)p)->314314- sfdl_flush_lock, flags);315315-316316- *p->sfdl_flush_addr = 0;311311+ spin_lock_irqsave((spinlock_t *)&p->sfdl_flush_lock,312312+ flags);313313+ *common->sfdl_flush_addr = 0;317314318315 /* force an interrupt. */319319- *(volatile uint32_t *)(p->sfdl_force_int_addr) = 1;316316+ *(volatile uint32_t *)(common->sfdl_force_int_addr) = 1;320317321318 /* wait for the interrupt to come back. */322322- while (*(p->sfdl_flush_addr) != 0x10f)319319+ while (*(common->sfdl_flush_addr) != 0x10f)323320 cpu_relax();324321325322 /* okay, everything is synched up. */326326- spin_unlock_irqrestore((spinlock_t *)&p->sfdl_flush_lock, flags);323323+ spin_unlock_irqrestore((spinlock_t *)&p->sfdl_flush_lock,324324+ flags);327325 }328326 return;329327}
+10-10
arch/ia64/sn/pci/pcibr/pcibr_provider.c
···9292 cnodeid_t near_cnode;9393 struct hubdev_info *hubdev_info;9494 struct pcibus_info *soft;9595- struct sn_flush_device_list *sn_flush_device_list;9595+ struct sn_flush_device_kernel *sn_flush_device_kernel;9696+ struct sn_flush_device_common *common;96979798 if (! IS_PCI_BRIDGE_ASIC(prom_bussoft->bs_asic_type)) {9899 return NULL;···138137 hubdev_info = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo);139138140139 if (hubdev_info->hdi_flush_nasid_list.widget_p) {141141- sn_flush_device_list = hubdev_info->hdi_flush_nasid_list.140140+ sn_flush_device_kernel = hubdev_info->hdi_flush_nasid_list.142141 widget_p[(int)soft->pbi_buscommon.bs_xid];143143- if (sn_flush_device_list) {142142+ if (sn_flush_device_kernel) {144143 for (j = 0; j < DEV_PER_WIDGET;145145- j++, sn_flush_device_list++) {146146- if (sn_flush_device_list->sfdl_slot == -1)144144+ j++, sn_flush_device_kernel++) {145145+ common = sn_flush_device_kernel->common;146146+ if (common->sfdl_slot == -1)147147 continue;148148- if ((sn_flush_device_list->149149- sfdl_persistent_segment ==148148+ if ((common->sfdl_persistent_segment ==150149 soft->pbi_buscommon.bs_persist_segment) &&151151- (sn_flush_device_list->152152- sfdl_persistent_busnum ==150150+ (common->sfdl_persistent_busnum ==153151 soft->pbi_buscommon.bs_persist_busnum))154154- sn_flush_device_list->sfdl_pcibus_info =152152+ common->sfdl_pcibus_info =155153 soft;156154 }157155 }
+6
include/asm-ia64/kprobes.h
···6868 unsigned long status;6969};70707171+#define MAX_PARAM_RSE_SIZE (0x60+0x60/0x3f)7172/* per-cpu kprobe control block */7273struct kprobe_ctlblk {7374 unsigned long kprobe_status;7475 struct pt_regs jprobe_saved_regs;7676+ unsigned long jprobes_saved_stacked_regs[MAX_PARAM_RSE_SIZE];7777+ unsigned long *bsp;7878+ unsigned long cfm;7579 struct prev_kprobe prev_kprobe;7680};7781···122118static inline void jprobe_return(void)123119{124120}121121+extern void invalidate_stacked_regs(void);122122+extern void flush_register_stack(void);125123126124#endif /* _ASM_KPROBES_H */
···227227228228 xpcOpenCloseError, /* 50: channel open/close protocol error */229229230230- xpcUnknownReason /* 51: unknown reason -- must be last in list */230230+ xpcDisconnected, /* 51: channel disconnected (closed) */231231+232232+ xpcUnknownReason /* 52: unknown reason -- must be last in list */231233};232234233235
+3-1
include/asm-ia64/thread_info.h
···9393#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */9494#define TIF_MEMDIE 179595#define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */9696+#define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */96979798#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)9899#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)···101100#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)102101#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)103102#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)104104-#define _TIF_SIGDELAYED (1 << TIF_SIGDELAYED)103103+#define _TIF_SIGDELAYED (1 << TIF_SIGDELAYED)105104#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)106105#define _TIF_MCA_INIT (1 << TIF_MCA_INIT)106106+#define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED)107107108108/* "work to do on user-return" bits */109109#define TIF_ALLWORK_MASK (_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SIGDELAYED)