Linux 3.4-rc5 Merge to pull in prerequisite change for Smack: 86812bb0de1a3758dc6c7aa01a763158a7c0638a Requested by Casey.
Showing the changes to kernel (19 of 811 files). Show all
Unified · Split
| @@ -386,6 +386,8 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags) · 385 unmodified lines | ||
| 386 | 386 | struct cred *new; |
| 387 | 387 | int ret; |
| 388 | 388 | |
| 389 | + p->replacement_session_keyring = NULL; | |
| 390 | + | |
| 389 | 391 | if ( |
| 390 | 392 | #ifdef CONFIG_KEYS |
| 391 | 393 | !p->cred->thread_keyring && |
| @@ -3183,7 +3183,7 @@ static void perf_event_for_each(struct perf_event *event, · 3182 unmodified lines | ||
| 3183 | 3183 | perf_event_for_each_child(event, func); |
| 3184 | 3184 | func(event); |
| 3185 | 3185 | list_for_each_entry(sibling, &event->sibling_list, group_entry) |
| 3186 | − perf_event_for_each_child(event, func); | |
| 3186 | + perf_event_for_each_child(sibling, func); | |
| 3187 | 3187 | mutex_unlock(&ctx->mutex); |
| 3188 | 3188 | } |
| 3189 | 3189 | |
| @@ -62,7 +62,7 @@ config IRQ_DOMAIN_DEBUG · 61 unmodified lines | ||
| 62 | 62 | help |
| 63 | 63 | This option will show the mapping relationship between hardware irq |
| 64 | 64 | numbers and Linux irq numbers. The mapping is exposed via debugfs |
| 65 | − in the file "virq_mapping". | |
| 65 | + in the file "irq_domain_mapping". | |
| 66 | 66 | |
| 67 | 67 | If you don't know what this means you don't need it. |
| 68 | 68 | |
| @@ -4,10 +4,10 @@ · 3 unmodified lines | ||
| 4 | 4 | |
| 5 | 5 | #include <linux/kallsyms.h> |
| 6 | 6 | |
| 7 | −#define P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f) | |
| 8 | −#define PS(f) if (desc->istate & f) printk("%14s set\n", #f) | |
| 7 | +#define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f) | |
| 8 | +#define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f) | |
| 9 | 9 | /* FIXME */ |
| 10 | −#define PD(f) do { } while (0) | |
| 10 | +#define ___PD(f) do { } while (0) | |
| 11 | 11 | |
| 12 | 12 | static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc) |
| 13 | 13 | { |
| @@ -23,23 +23,23 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc) · 9 unmodified lines | ||
| 23 | 23 | print_symbol("%s\n", (unsigned long)desc->action->handler); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | − P(IRQ_LEVEL); | |
| 27 | − P(IRQ_PER_CPU); | |
| 28 | − P(IRQ_NOPROBE); | |
| 29 | − P(IRQ_NOREQUEST); | |
| 30 | − P(IRQ_NOTHREAD); | |
| 31 | − P(IRQ_NOAUTOEN); | |
| 26 | + ___P(IRQ_LEVEL); | |
| 27 | + ___P(IRQ_PER_CPU); | |
| 28 | + ___P(IRQ_NOPROBE); | |
| 29 | + ___P(IRQ_NOREQUEST); | |
| 30 | + ___P(IRQ_NOTHREAD); | |
| 31 | + ___P(IRQ_NOAUTOEN); | |
| 32 | 32 | |
| 33 | − PS(IRQS_AUTODETECT); | |
| 34 | − PS(IRQS_REPLAY); | |
| 35 | − PS(IRQS_WAITING); | |
| 36 | − PS(IRQS_PENDING); | |
| 33 | + ___PS(IRQS_AUTODETECT); | |
| 34 | + ___PS(IRQS_REPLAY); | |
| 35 | + ___PS(IRQS_WAITING); | |
| 36 | + ___PS(IRQS_PENDING); | |
| 37 | 37 | |
| 38 | − PD(IRQS_INPROGRESS); | |
| 39 | − PD(IRQS_DISABLED); | |
| 40 | − PD(IRQS_MASKED); | |
| 38 | + ___PD(IRQS_INPROGRESS); | |
| 39 | + ___PD(IRQS_DISABLED); | |
| 40 | + ___PD(IRQS_MASKED); | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | −#undef P | |
| 44 | −#undef PS | |
| 45 | −#undef PD | |
| 43 | +#undef ___P | |
| 44 | +#undef ___PS | |
| 45 | +#undef ___PD | |
| @@ -23,7 +23,6 @@ static LIST_HEAD(irq_domain_list); · 22 unmodified lines | ||
| 23 | 23 | static DEFINE_MUTEX(irq_domain_mutex); |
| 24 | 24 | |
| 25 | 25 | static DEFINE_MUTEX(revmap_trees_mutex); |
| 26 | −static unsigned int irq_virq_count = NR_IRQS; | |
| 27 | 26 | static struct irq_domain *irq_default_domain; |
| 28 | 27 | |
| 29 | 28 | /** |
| @@ -184,13 +183,16 @@ struct irq_domain *irq_domain_add_linear(struct device_node *of_node, · 154 unmodified lines | ||
| 184 | 183 | } |
| 185 | 184 | |
| 186 | 185 | struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, |
| 186 | + unsigned int max_irq, | |
| 187 | 187 | const struct irq_domain_ops *ops, |
| 188 | 188 | void *host_data) |
| 189 | 189 | { |
| 190 | 190 | struct irq_domain *domain = irq_domain_alloc(of_node, |
| 191 | 191 | IRQ_DOMAIN_MAP_NOMAP, ops, host_data); |
| 192 | − if (domain) | |
| 192 | + if (domain) { | |
| 193 | + domain->revmap_data.nomap.max_irq = max_irq ? max_irq : ~0; | |
| 193 | 194 | irq_domain_add(domain); |
| 195 | + } | |
| 194 | 196 | return domain; |
| 195 | 197 | } |
| 196 | 198 | |
| @@ -262,22 +264,6 @@ void irq_set_default_host(struct irq_domain *domain) · 65 unmodified lines | ||
| 262 | 264 | irq_default_domain = domain; |
| 263 | 265 | } |
| 264 | 266 | |
| 265 | −/** | |
| 266 | − * irq_set_virq_count() - Set the maximum number of linux irqs | |
| 267 | − * @count: number of linux irqs, capped with NR_IRQS | |
| 268 | − * | |
| 269 | − * This is mainly for use by platforms like iSeries who want to program | |
| 270 | − * the virtual irq number in the controller to avoid the reverse mapping | |
| 271 | − */ | |
| 272 | −void irq_set_virq_count(unsigned int count) | |
| 273 | −{ | |
| 274 | − pr_debug("irq: Trying to set virq count to %d\n", count); | |
| 275 | − | |
| 276 | − BUG_ON(count < NUM_ISA_INTERRUPTS); | |
| 277 | − if (count < NR_IRQS) | |
| 278 | − irq_virq_count = count; | |
| 279 | −} | |
| 280 | − | |
| 281 | 267 | static int irq_setup_virq(struct irq_domain *domain, unsigned int virq, |
| 282 | 268 | irq_hw_number_t hwirq) |
| 283 | 269 | { |
| @@ -320,13 +306,12 @@ unsigned int irq_create_direct_mapping(struct irq_domain *domain) · 36 unmodified lines | ||
| 320 | 306 | pr_debug("irq: create_direct virq allocation failed\n"); |
| 321 | 307 | return 0; |
| 322 | 308 | } |
| 323 | − if (virq >= irq_virq_count) { | |
| 309 | + if (virq >= domain->revmap_data.nomap.max_irq) { | |
| 324 | 310 | pr_err("ERROR: no free irqs available below %i maximum\n", |
| 325 | − irq_virq_count); | |
| 311 | + domain->revmap_data.nomap.max_irq); | |
| 326 | 312 | irq_free_desc(virq); |
| 327 | 313 | return 0; |
| 328 | 314 | } |
| 329 | − | |
| 330 | 315 | pr_debug("irq: create_direct obtained virq %d\n", virq); |
| 331 | 316 | |
| 332 | 317 | if (irq_setup_virq(domain, virq, virq)) { |
| @@ -350,7 +335,8 @@ unsigned int irq_create_direct_mapping(struct irq_domain *domain) · 17 unmodified lines | ||
| 350 | 335 | unsigned int irq_create_mapping(struct irq_domain *domain, |
| 351 | 336 | irq_hw_number_t hwirq) |
| 352 | 337 | { |
| 353 | − unsigned int virq, hint; | |
| 338 | + unsigned int hint; | |
| 339 | + int virq; | |
| 354 | 340 | |
| 355 | 341 | pr_debug("irq: irq_create_mapping(0x%p, 0x%lx)\n", domain, hwirq); |
| 356 | 342 | |
| @@ -377,13 +363,13 @@ unsigned int irq_create_mapping(struct irq_domain *domain, · 20 unmodified lines | ||
| 377 | 363 | return irq_domain_legacy_revmap(domain, hwirq); |
| 378 | 364 | |
| 379 | 365 | /* Allocate a virtual interrupt number */ |
| 380 | − hint = hwirq % irq_virq_count; | |
| 366 | + hint = hwirq % nr_irqs; | |
| 381 | 367 | if (hint == 0) |
| 382 | 368 | hint++; |
| 383 | 369 | virq = irq_alloc_desc_from(hint, 0); |
| 384 | − if (!virq) | |
| 370 | + if (virq <= 0) | |
| 385 | 371 | virq = irq_alloc_desc_from(1, 0); |
| 386 | − if (!virq) { | |
| 372 | + if (virq <= 0) { | |
| 387 | 373 | pr_debug("irq: -> virq allocation failed\n"); |
| 388 | 374 | return 0; |
| 389 | 375 | } |
| @@ -515,7 +501,7 @@ unsigned int irq_find_mapping(struct irq_domain *domain, · 125 unmodified lines | ||
| 515 | 501 | irq_hw_number_t hwirq) |
| 516 | 502 | { |
| 517 | 503 | unsigned int i; |
| 518 | − unsigned int hint = hwirq % irq_virq_count; | |
| 504 | + unsigned int hint = hwirq % nr_irqs; | |
| 519 | 505 | |
| 520 | 506 | /* Look for default domain if nececssary */ |
| 521 | 507 | if (domain == NULL) |
| @@ -536,7 +522,7 @@ unsigned int irq_find_mapping(struct irq_domain *domain, · 14 unmodified lines | ||
| 536 | 522 | if (data && (data->domain == domain) && (data->hwirq == hwirq)) |
| 537 | 523 | return i; |
| 538 | 524 | i++; |
| 539 | − if (i >= irq_virq_count) | |
| 525 | + if (i >= nr_irqs) | |
| 540 | 526 | i = 1; |
| 541 | 527 | } while(i != hint); |
| 542 | 528 | return 0; |
| @@ -642,8 +628,9 @@ static int virq_debug_show(struct seq_file *m, void *private) · 99 unmodified lines | ||
| 642 | 628 | void *data; |
| 643 | 629 | int i; |
| 644 | 630 | |
| 645 | − seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq", | |
| 646 | − "chip name", "chip data", "domain name"); | |
| 631 | + seq_printf(m, "%-5s %-7s %-15s %-*s %s\n", "irq", "hwirq", | |
| 632 | + "chip name", (int)(2 * sizeof(void *) + 2), "chip data", | |
| 633 | + "domain name"); | |
| 647 | 634 | |
| 648 | 635 | for (i = 1; i < nr_irqs; i++) { |
| 649 | 636 | desc = irq_to_desc(i); |
| @@ -666,7 +653,7 @@ static int virq_debug_show(struct seq_file *m, void *private) · 16 unmodified lines | ||
| 666 | 653 | seq_printf(m, "%-15s ", p); |
| 667 | 654 | |
| 668 | 655 | data = irq_desc_get_chip_data(desc); |
| 669 | − seq_printf(m, "0x%16p ", data); | |
| 656 | + seq_printf(m, data ? "0x%p " : " %p ", data); | |
| 670 | 657 | |
| 671 | 658 | if (desc->irq_data.domain && desc->irq_data.domain->of_node) |
| 672 | 659 | p = desc->irq_data.domain->of_node->full_name; |
| @@ -11,6 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | #include <linux/irq_work.h> |
| 12 | 12 | #include <linux/percpu.h> |
| 13 | 13 | #include <linux/hardirq.h> |
| 14 | +#include <linux/irqflags.h> | |
| 14 | 15 | #include <asm/processor.h> |
| 15 | 16 | |
| 16 | 17 | /* |
| @@ -284,8 +284,12 @@ SYSCALL_DEFINE3(setitimer, int, which, struct itimerval __user *, value, · 283 unmodified lines | ||
| 284 | 284 | if (value) { |
| 285 | 285 | if(copy_from_user(&set_buffer, value, sizeof(set_buffer))) |
| 286 | 286 | return -EFAULT; |
| 287 | − } else | |
| 288 | − memset((char *) &set_buffer, 0, sizeof(set_buffer)); | |
| 287 | + } else { | |
| 288 | + memset(&set_buffer, 0, sizeof(set_buffer)); | |
| 289 | + printk_once(KERN_WARNING "%s calls setitimer() with new_value NULL pointer." | |
| 290 | + " Misfeature support will be removed\n", | |
| 291 | + current->comm); | |
| 292 | + } | |
| 289 | 293 | |
| 290 | 294 | error = do_setitimer(which, &set_buffer, ovalue ? &get_buffer : NULL); |
| 291 | 295 | if (error || !ovalue) |
| @@ -97,7 +97,7 @@ void panic(const char *fmt, ...) · 96 unmodified lines | ||
| 97 | 97 | /* |
| 98 | 98 | * Avoid nested stack-dumping if a panic occurs during oops processing |
| 99 | 99 | */ |
| 100 | − if (!oops_in_progress) | |
| 100 | + if (!test_taint(TAINT_DIE) && oops_in_progress <= 1) | |
| 101 | 101 | dump_stack(); |
| 102 | 102 | #endif |
| 103 | 103 | |
| @@ -51,6 +51,23 @@ · 50 unmodified lines | ||
| 51 | 51 | |
| 52 | 52 | #define MAP_PAGE_ENTRIES (PAGE_SIZE / sizeof(sector_t) - 1) |
| 53 | 53 | |
| 54 | +/* | |
| 55 | + * Number of free pages that are not high. | |
| 56 | + */ | |
| 57 | +static inline unsigned long low_free_pages(void) | |
| 58 | +{ | |
| 59 | + return nr_free_pages() - nr_free_highpages(); | |
| 60 | +} | |
| 61 | + | |
| 62 | +/* | |
| 63 | + * Number of pages required to be kept free while writing the image. Always | |
| 64 | + * half of all available low pages before the writing starts. | |
| 65 | + */ | |
| 66 | +static inline unsigned long reqd_free_pages(void) | |
| 67 | +{ | |
| 68 | + return low_free_pages() / 2; | |
| 69 | +} | |
| 70 | + | |
| 54 | 71 | struct swap_map_page { |
| 55 | 72 | sector_t entries[MAP_PAGE_ENTRIES]; |
| 56 | 73 | sector_t next_swap; |
| @@ -72,7 +89,7 @@ struct swap_map_handle { · 15 unmodified lines | ||
| 72 | 89 | sector_t cur_swap; |
| 73 | 90 | sector_t first_sector; |
| 74 | 91 | unsigned int k; |
| 75 | − unsigned long nr_free_pages, written; | |
| 92 | + unsigned long reqd_free_pages; | |
| 76 | 93 | u32 crc32; |
| 77 | 94 | }; |
| 78 | 95 | |
| @@ -316,8 +333,7 @@ static int get_swap_writer(struct swap_map_handle *handle) · 237 unmodified lines | ||
| 316 | 333 | goto err_rel; |
| 317 | 334 | } |
| 318 | 335 | handle->k = 0; |
| 319 | − handle->nr_free_pages = nr_free_pages() >> 1; | |
| 320 | − handle->written = 0; | |
| 336 | + handle->reqd_free_pages = reqd_free_pages(); | |
| 321 | 337 | handle->first_sector = handle->cur_swap; |
| 322 | 338 | return 0; |
| 323 | 339 | err_rel: |
| @@ -352,11 +368,11 @@ static int swap_write_page(struct swap_map_handle *handle, void *buf, · 28 unmodified lines | ||
| 352 | 368 | handle->cur_swap = offset; |
| 353 | 369 | handle->k = 0; |
| 354 | 370 | } |
| 355 | − if (bio_chain && ++handle->written > handle->nr_free_pages) { | |
| 371 | + if (bio_chain && low_free_pages() <= handle->reqd_free_pages) { | |
| 356 | 372 | error = hib_wait_on_bio_chain(bio_chain); |
| 357 | 373 | if (error) |
| 358 | 374 | goto out; |
| 359 | − handle->written = 0; | |
| 375 | + handle->reqd_free_pages = reqd_free_pages(); | |
| 360 | 376 | } |
| 361 | 377 | out: |
| 362 | 378 | return error; |
| @@ -618,7 +634,7 @@ static int save_image_lzo(struct swap_map_handle *handle, · 255 unmodified lines | ||
| 618 | 634 | * Adjust number of free pages after all allocations have been done. |
| 619 | 635 | * We don't want to run out of pages when writing. |
| 620 | 636 | */ |
| 621 | − handle->nr_free_pages = nr_free_pages() >> 1; | |
| 637 | + handle->reqd_free_pages = reqd_free_pages(); | |
| 622 | 638 | |
| 623 | 639 | /* |
| 624 | 640 | * Start the CRC32 thread. |
| @@ -1820,7 +1820,6 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu), · 1819 unmodified lines | ||
| 1820 | 1820 | * a quiescent state betweentimes. |
| 1821 | 1821 | */ |
| 1822 | 1822 | local_irq_save(flags); |
| 1823 | − WARN_ON_ONCE(cpu_is_offline(smp_processor_id())); | |
| 1824 | 1823 | rdp = this_cpu_ptr(rsp->rda); |
| 1825 | 1824 | |
| 1826 | 1825 | /* Add the callback to our list. */ |
| @@ -6405,16 +6405,26 @@ static void __sdt_free(const struct cpumask *cpu_map) · 6404 unmodified lines | ||
| 6405 | 6405 | struct sd_data *sdd = &tl->data; |
| 6406 | 6406 | |
| 6407 | 6407 | for_each_cpu(j, cpu_map) { |
| 6408 | − struct sched_domain *sd = *per_cpu_ptr(sdd->sd, j); | |
| 6409 | − if (sd && (sd->flags & SD_OVERLAP)) | |
| 6410 | − free_sched_groups(sd->groups, 0); | |
| 6411 | − kfree(*per_cpu_ptr(sdd->sd, j)); | |
| 6412 | − kfree(*per_cpu_ptr(sdd->sg, j)); | |
| 6413 | − kfree(*per_cpu_ptr(sdd->sgp, j)); | |
| 6408 | + struct sched_domain *sd; | |
| 6409 | + | |
| 6410 | + if (sdd->sd) { | |
| 6411 | + sd = *per_cpu_ptr(sdd->sd, j); | |
| 6412 | + if (sd && (sd->flags & SD_OVERLAP)) | |
| 6413 | + free_sched_groups(sd->groups, 0); | |
| 6414 | + kfree(*per_cpu_ptr(sdd->sd, j)); | |
| 6415 | + } | |
| 6416 | + | |
| 6417 | + if (sdd->sg) | |
| 6418 | + kfree(*per_cpu_ptr(sdd->sg, j)); | |
| 6419 | + if (sdd->sgp) | |
| 6420 | + kfree(*per_cpu_ptr(sdd->sgp, j)); | |
| 6414 | 6421 | } |
| 6415 | 6422 | free_percpu(sdd->sd); |
| 6423 | + sdd->sd = NULL; | |
| 6416 | 6424 | free_percpu(sdd->sg); |
| 6425 | + sdd->sg = NULL; | |
| 6417 | 6426 | free_percpu(sdd->sgp); |
| 6427 | + sdd->sgp = NULL; | |
| 6418 | 6428 | } |
| 6419 | 6429 | } |
| 6420 | 6430 | |
| @@ -784,7 +784,7 @@ account_entity_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se) · 783 unmodified lines | ||
| 784 | 784 | update_load_add(&rq_of(cfs_rq)->load, se->load.weight); |
| 785 | 785 | #ifdef CONFIG_SMP |
| 786 | 786 | if (entity_is_task(se)) |
| 787 | − list_add_tail(&se->group_node, &rq_of(cfs_rq)->cfs_tasks); | |
| 787 | + list_add(&se->group_node, &rq_of(cfs_rq)->cfs_tasks); | |
| 788 | 788 | #endif |
| 789 | 789 | cfs_rq->nr_running++; |
| 790 | 790 | } |
| @@ -3215,6 +3215,8 @@ static int move_one_task(struct lb_env *env) · 2424 unmodified lines | ||
| 3215 | 3215 | |
| 3216 | 3216 | static unsigned long task_h_load(struct task_struct *p); |
| 3217 | 3217 | |
| 3218 | +static const unsigned int sched_nr_migrate_break = 32; | |
| 3219 | + | |
| 3218 | 3220 | /* |
| 3219 | 3221 | * move_tasks tries to move up to load_move weighted load from busiest to |
| 3220 | 3222 | * this_rq, as part of a balancing operation within domain "sd". |
| @@ -3242,7 +3244,7 @@ static int move_tasks(struct lb_env *env) · 21 unmodified lines | ||
| 3242 | 3244 | |
| 3243 | 3245 | /* take a breather every nr_migrate tasks */ |
| 3244 | 3246 | if (env->loop > env->loop_break) { |
| 3245 | − env->loop_break += sysctl_sched_nr_migrate; | |
| 3247 | + env->loop_break += sched_nr_migrate_break; | |
| 3246 | 3248 | env->flags |= LBF_NEED_BREAK; |
| 3247 | 3249 | break; |
| 3248 | 3250 | } |
| @@ -3252,7 +3254,7 @@ static int move_tasks(struct lb_env *env) · 3 unmodified lines | ||
| 3252 | 3254 | |
| 3253 | 3255 | load = task_h_load(p); |
| 3254 | 3256 | |
| 3255 | − if (load < 16 && !env->sd->nr_balance_failed) | |
| 3257 | + if (sched_feat(LB_MIN) && load < 16 && !env->sd->nr_balance_failed) | |
| 3256 | 3258 | goto next; |
| 3257 | 3259 | |
| 3258 | 3260 | if ((load / 2) > env->load_move) |
| @@ -4407,7 +4409,7 @@ static int load_balance(int this_cpu, struct rq *this_rq, · 1148 unmodified lines | ||
| 4407 | 4409 | .dst_cpu = this_cpu, |
| 4408 | 4410 | .dst_rq = this_rq, |
| 4409 | 4411 | .idle = idle, |
| 4410 | − .loop_break = sysctl_sched_nr_migrate, | |
| 4412 | + .loop_break = sched_nr_migrate_break, | |
| 4411 | 4413 | }; |
| 4412 | 4414 | |
| 4413 | 4415 | cpumask_copy(cpus, cpu_active_mask); |
| @@ -4445,10 +4447,10 @@ redo: · 31 unmodified lines | ||
| 4445 | 4447 | * correctly treated as an imbalance. |
| 4446 | 4448 | */ |
| 4447 | 4449 | env.flags |= LBF_ALL_PINNED; |
| 4448 | − env.load_move = imbalance; | |
| 4449 | − env.src_cpu = busiest->cpu; | |
| 4450 | − env.src_rq = busiest; | |
| 4451 | − env.loop_max = busiest->nr_running; | |
| 4450 | + env.load_move = imbalance; | |
| 4451 | + env.src_cpu = busiest->cpu; | |
| 4452 | + env.src_rq = busiest; | |
| 4453 | + env.loop_max = min_t(unsigned long, sysctl_sched_nr_migrate, busiest->nr_running); | |
| 4452 | 4454 | |
| 4453 | 4455 | more_balance: |
| 4454 | 4456 | local_irq_save(flags); |
| @@ -68,3 +68,4 @@ SCHED_FEAT(TTWU_QUEUE, true) · 67 unmodified lines | ||
| 68 | 68 | |
| 69 | 69 | SCHED_FEAT(FORCE_SD_OVERLAP, false) |
| 70 | 70 | SCHED_FEAT(RT_RUNTIME_SHARE, true) |
| 71 | +SCHED_FEAT(LB_MIN, false) | |
| @@ -1,6 +1,10 @@ | ||
| 1 | 1 | # |
| 2 | 2 | # Timer subsystem related configuration options |
| 3 | 3 | # |
| 4 | + | |
| 5 | +# Core internal switch. Selected by NO_HZ / HIGH_RES_TIMERS. This is | |
| 6 | +# only related to the tick functionality. Oneshot clockevent devices | |
| 7 | +# are supported independ of this. | |
| 4 | 8 | config TICK_ONESHOT |
| 5 | 9 | bool |
| 6 | 10 | |
| @@ -346,7 +346,8 @@ int tick_resume_broadcast(void) · 345 unmodified lines | ||
| 346 | 346 | tick_get_broadcast_mask()); |
| 347 | 347 | break; |
| 348 | 348 | case TICKDEV_MODE_ONESHOT: |
| 349 | − broadcast = tick_resume_broadcast_oneshot(bc); | |
| 349 | + if (!cpumask_empty(tick_get_broadcast_mask())) | |
| 350 | + broadcast = tick_resume_broadcast_oneshot(bc); | |
| 350 | 351 | break; |
| 351 | 352 | } |
| 352 | 353 | } |
| @@ -373,6 +374,9 @@ static int tick_broadcast_set_event(ktime_t expires, int force) · 20 unmodified lines | ||
| 373 | 374 | { |
| 374 | 375 | struct clock_event_device *bc = tick_broadcast_device.evtdev; |
| 375 | 376 | |
| 377 | + if (bc->mode != CLOCK_EVT_MODE_ONESHOT) | |
| 378 | + clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); | |
| 379 | + | |
| 376 | 380 | return clockevents_program_event(bc, expires, force); |
| 377 | 381 | } |
| 378 | 382 | |
| @@ -531,7 +535,6 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc) · 152 unmodified lines | ||
| 531 | 535 | int was_periodic = bc->mode == CLOCK_EVT_MODE_PERIODIC; |
| 532 | 536 | |
| 533 | 537 | bc->event_handler = tick_handle_oneshot_broadcast; |
| 534 | − clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); | |
| 535 | 538 | |
| 536 | 539 | /* Take the do_timer update */ |
| 537 | 540 | tick_do_timer_cpu = cpu; |
| @@ -549,6 +552,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc) · 11 unmodified lines | ||
| 549 | 552 | to_cpumask(tmpmask)); |
| 550 | 553 | |
| 551 | 554 | if (was_periodic && !cpumask_empty(to_cpumask(tmpmask))) { |
| 555 | + clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); | |
| 552 | 556 | tick_broadcast_init_next_event(to_cpumask(tmpmask), |
| 553 | 557 | tick_next_period); |
| 554 | 558 | tick_broadcast_set_event(tick_next_period, 1); |
| @@ -575,15 +579,12 @@ void tick_broadcast_switch_to_oneshot(void) · 20 unmodified lines | ||
| 575 | 579 | unsigned long flags; |
| 576 | 580 | |
| 577 | 581 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); |
| 578 | − if (cpumask_empty(tick_get_broadcast_mask())) | |
| 579 | − goto end; | |
| 580 | 582 | |
| 581 | 583 | tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT; |
| 582 | 584 | bc = tick_broadcast_device.evtdev; |
| 583 | 585 | if (bc) |
| 584 | 586 | tick_broadcast_setup_oneshot(bc); |
| 585 | 587 | |
| 586 | −end: | |
| 587 | 588 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); |
| 588 | 589 | } |
| 589 | 590 | |
| @@ -534,9 +534,9 @@ static void tick_nohz_restart(struct tick_sched *ts, ktime_t now) · 533 unmodified lines | ||
| 534 | 534 | hrtimer_get_expires(&ts->sched_timer), 0)) |
| 535 | 535 | break; |
| 536 | 536 | } |
| 537 | − /* Update jiffies and reread time */ | |
| 538 | − tick_do_update_jiffies64(now); | |
| 537 | + /* Reread time and update jiffies */ | |
| 539 | 538 | now = ktime_get(); |
| 539 | + tick_do_update_jiffies64(now); | |
| 540 | 540 | } |
| 541 | 541 | } |
| 542 | 542 | |
| @@ -4629,7 +4629,8 @@ static ssize_t · 4628 unmodified lines | ||
| 4629 | 4629 | rb_simple_read(struct file *filp, char __user *ubuf, |
| 4630 | 4630 | size_t cnt, loff_t *ppos) |
| 4631 | 4631 | { |
| 4632 | − struct ring_buffer *buffer = filp->private_data; | |
| 4632 | + struct trace_array *tr = filp->private_data; | |
| 4633 | + struct ring_buffer *buffer = tr->buffer; | |
| 4633 | 4634 | char buf[64]; |
| 4634 | 4635 | int r; |
| 4635 | 4636 | |
| @@ -4647,7 +4648,8 @@ static ssize_t · 11 unmodified lines | ||
| 4647 | 4648 | rb_simple_write(struct file *filp, const char __user *ubuf, |
| 4648 | 4649 | size_t cnt, loff_t *ppos) |
| 4649 | 4650 | { |
| 4650 | − struct ring_buffer *buffer = filp->private_data; | |
| 4651 | + struct trace_array *tr = filp->private_data; | |
| 4652 | + struct ring_buffer *buffer = tr->buffer; | |
| 4651 | 4653 | unsigned long val; |
| 4652 | 4654 | int ret; |
| 4653 | 4655 | |
| @@ -4734,7 +4736,7 @@ static __init int tracer_init_debugfs(void) · 80 unmodified lines | ||
| 4734 | 4736 | &trace_clock_fops); |
| 4735 | 4737 | |
| 4736 | 4738 | trace_create_file("tracing_on", 0644, d_tracer, |
| 4737 | − global_trace.buffer, &rb_simple_fops); | |
| 4739 | + &global_trace, &rb_simple_fops); | |
| 4738 | 4740 | |
| 4739 | 4741 | #ifdef CONFIG_DYNAMIC_FTRACE |
| 4740 | 4742 | trace_create_file("dyn_ftrace_total_info", 0444, d_tracer, |
| @@ -836,11 +836,11 @@ extern const char *__stop___trace_bprintk_fmt[]; · 835 unmodified lines | ||
| 836 | 836 | filter) |
| 837 | 837 | #include "trace_entries.h" |
| 838 | 838 | |
| 839 | −#ifdef CONFIG_FUNCTION_TRACER | |
| 839 | +#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_FUNCTION_TRACER) | |
| 840 | 840 | int perf_ftrace_event_register(struct ftrace_event_call *call, |
| 841 | 841 | enum trace_reg type, void *data); |
| 842 | 842 | #else |
| 843 | 843 | #define perf_ftrace_event_register NULL |
| 844 | −#endif /* CONFIG_FUNCTION_TRACER */ | |
| 844 | +#endif | |
| 845 | 845 | |
| 846 | 846 | #endif /* _LINUX_KERNEL_TRACE_H */ |
| @@ -652,6 +652,8 @@ int trace_print_lat_context(struct trace_iterator *iter) · 651 unmodified lines | ||
| 652 | 652 | { |
| 653 | 653 | u64 next_ts; |
| 654 | 654 | int ret; |
| 655 | + /* trace_find_next_entry will reset ent_size */ | |
| 656 | + int ent_size = iter->ent_size; | |
| 655 | 657 | struct trace_seq *s = &iter->seq; |
| 656 | 658 | struct trace_entry *entry = iter->ent, |
| 657 | 659 | *next_entry = trace_find_next_entry(iter, NULL, |
| @@ -660,6 +662,9 @@ int trace_print_lat_context(struct trace_iterator *iter) · 2 unmodified lines | ||
| 660 | 662 | unsigned long abs_usecs = ns2usecs(iter->ts - iter->tr->time_start); |
| 661 | 663 | unsigned long rel_usecs; |
| 662 | 664 | |
| 665 | + /* Restore the original ent_size */ | |
| 666 | + iter->ent_size = ent_size; | |
| 667 | + | |
| 663 | 668 | if (!next_entry) |
| 664 | 669 | next_ts = iter->ts; |
| 665 | 670 | rel_usecs = ns2usecs(next_ts - iter->ts); |