Alter stealtime reporting in KVM
Subsystems (37)
cover Alter stealtime reporting in KVM
In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported in accounting tools such as top or vmstat. This can cause confusion for the end user. To ease the confusion this patch set adds the idea of consigned (expected steal) time. The host will separate the consigned time from the steal time. The consignment limit passed to the host will be the amount of steal time expected within a fixed period of time. Any other steal time accruing during that period will show as the traditional steal time.
---
Michael Wolf (5):
Alter the amount of steal time reported by the guest. Expand the steal time msr to also contain the consigned time. Add the code to send the consigned time from the host to the guest Add a timer to allow the separation of consigned from steal time. Add an ioctl to communicate the consign limit to the host.
CREDITS | 5 Documentation/arm64/memory.txt | 12 Documentation/cgroups/memory.txt | 4 .../devicetree/bindings/net/mdio-gpio.txt | 9 Documentation/filesystems/proc.txt | 16 Documentation/hwmon/fam15h_power | 2 Documentation/kernel-parameters.txt | 20 Documentation/networking/netdev-features.txt | 2 Documentation/scheduler/numa-problem.txt | 20 MAINTAINERS | 87 + Makefile | 2 arch/alpha/kernel/osf_sys.c | 6 arch/arm/boot/Makefile | 10 arch/arm/boot/dts/tegra30.dtsi | 4 arch/arm/include/asm/io.h | 4 arch/arm/include/asm/sched_clock.h | 2 arch/arm/include/asm/vfpmacros.h | 12 arch/arm/include/uapi/asm/hwcap.h | 3 arch/arm/kernel/sched_clock.c | 18 arch/arm/mach-at91/at91rm9200_devices.c | 2 arch/arm/mach-at91/at91sam9260_devices.c | 2 arch/arm/mach-at91/at91sam9261_devices.c | 2 arch/arm/mach-at91/at91sam9263_devices.c | 2 arch/arm/mach-at91/at91sam9g45_devices.c | 12 arch/arm/mach-davinci/dm644x.c | 3 arch/arm/mach-highbank/system.c | 3 arch/arm/mach-imx/clk-gate2.c | 2 arch/arm/mach-imx/ehci-imx25.c | 2 arch/arm/mach-imx/ehci-imx35.c | 2 arch/arm/mach-omap2/board-igep0020.c | 5 arch/arm/mach-omap2/clockdomains44xx_data.c | 2 arch/arm/mach-omap2/devices.c | 79 + arch/arm/mach-omap2/omap_hwmod.c | 63 + arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 36 arch/arm/mach-omap2/twl-common.c | 3 arch/arm/mach-omap2/vc.c | 2 arch/arm/mach-pxa/hx4700.c | 8 arch/arm/mach-pxa/spitz_pm.c | 8 arch/arm/mm/alignment.c | 2 arch/arm/plat-omap/include/plat/omap_hwmod.h | 6 arch/arm/tools/Makefile | 2 arch/arm/vfp/vfpmodule.c | 9 arch/arm/xen/enlighten.c | 11 arch/arm/xen/hypercall.S | 14 arch/arm64/Kconfig | 1 arch/arm64/include/asm/elf.h | 5 arch/arm64/include/asm/fpsimd.h | 5 arch/arm64/include/asm/io.h | 10 arch/arm64/include/asm/pgtable-hwdef.h | 6 arch/arm64/include/asm/pgtable.h | 40 - arch/arm64/include/asm/processor.h | 2 arch/arm64/include/asm/unistd.h | 1 arch/arm64/kernel/perf_event.c | 10 arch/arm64/kernel/process.c | 18 arch/arm64/kernel/smp.c | 3 arch/arm64/mm/init.c | 2 arch/frv/Kconfig | 1 arch/frv/boot/Makefile | 10 arch/frv/include/asm/unistd.h | 1 arch/frv/kernel/entry.S | 28 arch/frv/kernel/process.c | 5 arch/frv/mb93090-mb00/pci-dma-nommu.c | 1 arch/h8300/include/asm/cache.h | 3 arch/ia64/mm/init.c | 1 arch/m68k/include/asm/signal.h | 6 arch/mips/cavium-octeon/executive/cvmx-l2c.c | 900 ------------ arch/unicore32/include/asm/byteorder.h | 24 arch/unicore32/include/asm/kvm_para.h | 1 arch/unicore32/include/asm/sigcontext.h | 29 arch/unicore32/include/asm/unistd.h | 14 arch/x86/include/asm/kvm_host.h | 11 arch/x86/include/asm/kvm_para.h | 3 arch/x86/include/asm/paravirt.h | 4 arch/x86/include/asm/paravirt_types.h | 2 arch/x86/kernel/kvm.c | 8 arch/x86/kernel/paravirt.c | 4 arch/x86/kvm/x86.c | 50 + fs/proc/stat.c | 9 include/linux/kernel_stat.h | 2 include/linux/kvm_host.h | 2 include/linux/raid/md_p.h | 301 ---- include/uapi/linux/kvm.h | 2 kernel/sched/core.c | 10 kernel/sched/cputime.c | 21 kernel/sched/sched.h | 2 tools/perf/builtin-test.c | 1559 -------------------- tools/perf/util/dso-test-data.c | 153 -- tools/perf/util/parse-events-test.c | 1116 -------------- tools/testing/selftests/epoll/Makefile | 11 tools/testing/selftests/epoll/test_epoll.c | 344 ---- virt/kvm/kvm_main.c | 7 91 files changed, 574 insertions(+), 4694 deletions(-) delete mode 100644 arch/mips/cavium-octeon/executive/cvmx-l2c.c delete mode 100644 arch/unicore32/include/asm/byteorder.h delete mode 100644 arch/unicore32/include/asm/kvm_para.h delete mode 100644 arch/unicore32/include/asm/sigcontext.h delete mode 100644 arch/unicore32/include/asm/unistd.h delete mode 100644 include/linux/raid/md_p.h delete mode 100644 tools/perf/builtin-test.c delete mode 100644 tools/perf/util/dso-test-data.c delete mode 100644 tools/perf/util/parse-events-test.c delete mode 100644 tools/testing/selftests/epoll/Makefile delete mode 100644 tools/testing/selftests/epoll/test_epoll.c
Signature · 1 line
Signature
PATCH 1/5 Alter the amount of steal time reported by the guest.
Modify the amount of stealtime that the kernel reports via the /proc interface. Steal time will now be broken down into steal_time and consigned_time. Consigned_time will represent the amount of time that is expected to be lost due to overcommitment of the physical cpu or by using cpu capping. The amount consigned_time will be passed in using an ioctl. The time will be expressed in the number of nanoseconds to be lost in during the fixed period. The fixed period is currently 1/10th of a second.
--- fs/proc/stat.c | 9 +++++++-- include/linux/kernel_stat.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-)
fs/proc/stat.c +7 -2
@@ -82,7 +82,7 @@ static int show_stat(struct seq_file *p, void *v)int i, j;unsigned long jif;u64 user, nice, system, idle, iowait, irq, softirq, steal; -u64 guest, guest_nice; +u64 guest, guest_nice, consign;u64 sum =0 ;u64 sum_softirq =0 ;unsigned int per_softirq_sums[NR_SOFTIRQS ] = {0 };
@@ -90,10 +90,11 @@ static int show_stat(struct seq_file *p, void *v) user = nice = system = idle = iowait = irq = softirq = steal =0 ; - guest = guest_nice =0 ; + guest = guest_nice = consign =0 ;getboottime (&boottime); jif = boottime.tv_sec; +for_each_possible_cpu (i) { user +=kcpustat_cpu (i).cpustat[CPUTIME_USER ]; nice +=kcpustat_cpu (i).cpustat[CPUTIME_NICE ];
@@ -105,6 +106,7 @@ static int show_stat(struct seq_file *p, void *v) steal +=kcpustat_cpu (i).cpustat[CPUTIME_STEAL ]; guest +=kcpustat_cpu (i).cpustat[CPUTIME_GUEST ]; guest_nice +=kcpustat_cpu (i).cpustat[CPUTIME_GUEST_NICE ]; + consign +=kcpustat_cpu (i).cpustat[CPUTIME_CONSIGN ]; sum +=kstat_cpu_irqs_sum (i); sum +=arch_irq_stat_cpu (i);
@@ -128,6 +130,7 @@ static int show_stat(struct seq_file *p, void *v)seq_put_decimal_ull (p,' ' ,cputime64_to_clock_t (steal));seq_put_decimal_ull (p,' ' ,cputime64_to_clock_t (guest));seq_put_decimal_ull (p,' ' ,cputime64_to_clock_t (guest_nice)); +seq_put_decimal_ull (p,' ' ,cputime64_to_clock_t (consign));seq_putc (p,'\n' );for_each_online_cpu (i) {
@@ -142,6 +145,7 @@ static int show_stat(struct seq_file *p, void *v) steal =kcpustat_cpu (i).cpustat[CPUTIME_STEAL ]; guest =kcpustat_cpu (i).cpustat[CPUTIME_GUEST ]; guest_nice =kcpustat_cpu (i).cpustat[CPUTIME_GUEST_NICE ]; + consign =kcpustat_cpu (i).cpustat[CPUTIME_CONSIGN ];seq_printf (p,"cpu%d" , i);seq_put_decimal_ull (p,' ' ,cputime64_to_clock_t (user));seq_put_decimal_ull (p,' ' ,cputime64_to_clock_t (nice));
@@ -153,6 +157,7 @@ static int show_stat(struct seq_file *p, void *v)seq_put_decimal_ull (p,' ' ,cputime64_to_clock_t (steal));seq_put_decimal_ull (p,' ' ,cputime64_to_clock_t (guest));seq_put_decimal_ull (p,' ' ,cputime64_to_clock_t (guest_nice)); +seq_put_decimal_ull (p,' ' ,cputime64_to_clock_t (consign));seq_putc (p,'\n' ); }seq_printf (p,"intr %llu" , (unsigned long long )sum);
include/linux/kernel_stat.h +1 -0
@@ -28,6 +28,7 @@ enum cpu_usage_stat {CPUTIME_STEAL ,CPUTIME_GUEST ,CPUTIME_GUEST_NICE , +CPUTIME_CONSIGN , NR_STATS, };
PATCH 2/5 Expand the steal time msr to also contain the consigned time.
In reply to Michael WolfAdd a consigned field. This field will hold the time lost due to capping or overcommit. The rest of the time will still show up in the steal-time field.
--- arch/x86/include/asm/paravirt.h | 4 ++-- arch/x86/include/asm/paravirt_types.h | 2 +- arch/x86/kernel/kvm.c | 7 ++----- kernel/sched/core.c | 10 +++++++++- kernel/sched/cputime.c | 2 +- 5 files changed, 15 insertions(+), 10 deletions(-)
arch/x86/include/asm/paravirt.h +2 -2
@@ -196,9 +196,9 @@ struct static_key;extern struct static_key paravirt_steal_enabled;extern struct static_key paravirt_steal_rq_enabled; -static inline u64 paravirt_steal_clock (int cpu) +static inline u64 paravirt_steal_clock (int cpu,u64 *steal) { -return PVOP_CALL1 (u64, pv_time_ops.steal_clock, cpu); +PVOP_VCALL2 (pv_time_ops.steal_clock, cpu, steal); }static inline unsigned long long paravirt_read_pmc (int counter)
arch/x86/include/asm/paravirt_types.h +1 -1
@@ -95,7 +95,7 @@ struct pv_lazy_ops {struct pv_time_ops {unsigned long long (*sched_clock)(void ); -unsigned long long (*steal_clock)(int cpu); +void (*steal_clock)(int cpu,unsigned long long *steal);unsigned long (*get_tsc_khz)(void ); };
arch/x86/kernel/kvm.c +2 -5
@@ -372,9 +372,8 @@ static struct notifier_block kvm_pv_reboot_nb = { .notifier_call = kvm_pv_reboot_notify, }; -static u64 kvm_steal_clock (int cpu) +static void kvm_steal_clock (int cpu,u64 *steal) { -u64 steal;struct kvm_steal_time *src;int version;
@@ -382,11 +381,9 @@ static u64 kvm_steal_clock(int cpu)do { version = src->version;rmb (); - steal = src->steal; + *steal = src->steal;rmb (); }while ((version &1 ) || (version != src->version)); - -return steal; }void kvm_disable_steal_time (void )
kernel/sched/core.c +9 -1
@@ -748,6 +748,7 @@ static void update_rq_clock_task(struct rq *rq, s64 delta)*/ #if defined(CONFIG_IRQ_TIME_ACCOUNTING ) || defined(CONFIG_PARAVIRT_TIME_ACCOUNTING )s64 steal =0 , irq_delta =0 ; +u64 consigned =0 ;#endif #ifdef CONFIG_IRQ_TIME_ACCOUNTING irq_delta =irq_time_read (cpu_of (rq)) - rq->prev_irq_time;
@@ -776,8 +777,15 @@ static void update_rq_clock_task(struct rq *rq, s64 delta)#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING if (static_key_false ((¶virt_steal_rq_enabled))) {u64 st; +u64 cs; - steal =paravirt_steal_clock (cpu_of (rq)); +paravirt_steal_clock (cpu_of (rq), &steal, &consigned); +/* +* since we are not assigning the steal time to cpustats +* here, just combine the steal and consigned times to +* do the rest of the calculations. +*/ + steal += consigned; steal -= rq->prev_steal_time_rq;if (unlikely (steal > delta))
kernel/sched/cputime.c +1 -1
@@ -275,7 +275,7 @@ static __always_inline bool steal_account_process_tick(void)if (static_key_false (¶virt_steal_enabled)) {u64 steal, st =0 ; - steal =paravirt_steal_clock (smp_processor_id ()); +paravirt_steal_clock (smp_processor_id (), &steal); steal -=this_rq ()->prev_steal_time; st =steal_ticks (steal);
PATCH 3/5 Add the code to send the consigned time from the host to the guest
In reply to Michael WolfAdd the code to send the consigned time from the host to the guest.
--- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/asm/kvm_para.h | 3 ++- arch/x86/include/asm/paravirt.h | 4 ++-- arch/x86/kernel/kvm.c | 3 ++- arch/x86/kernel/paravirt.c | 4 ++-- arch/x86/kvm/x86.c | 2 ++ include/linux/kernel_stat.h | 1 + kernel/sched/cputime.c | 21 +++++++++++++++++++-- kernel/sched/sched.h | 2 ++ 9 files changed, 33 insertions(+), 8 deletions(-)
arch/x86/include/asm/kvm_host.h +1 -0
@@ -426,6 +426,7 @@ struct kvm_vcpu_arch {u64 msr_val;u64 last_steal;u64 accum_steal; +u64 accum_consigned;struct gfn_to_hva_cache stime;struct kvm_steal_time steal; } st;
arch/x86/include/asm/kvm_para.h +2 -1
@@ -42,9 +42,10 @@struct kvm_steal_time {__u64 steal; +__u64 consigned;__u32 version;__u32 flags; -__u32 pad[12 ]; +__u32 pad[10 ]; };#define KVM_STEAL_ALIGNMENT_BITS 5
arch/x86/include/asm/paravirt.h +2 -2
@@ -196,9 +196,9 @@ struct static_key;extern struct static_key paravirt_steal_enabled;extern struct static_key paravirt_steal_rq_enabled; -static inline u64 paravirt_steal_clock (int cpu,u64 *steal) +static inline u64 paravirt_steal_clock (int cpu,u64 *steal,u64 *consigned) { -PVOP_VCALL2 (pv_time_ops.steal_clock, cpu, steal); +PVOP_VCALL3 (pv_time_ops.steal_clock, cpu, steal, consigned); }static inline unsigned long long paravirt_read_pmc (int counter)
arch/x86/kernel/kvm.c +2 -1
@@ -372,7 +372,7 @@ static struct notifier_block kvm_pv_reboot_nb = { .notifier_call = kvm_pv_reboot_notify, }; -static void kvm_steal_clock (int cpu,u64 *steal) +static void kvm_steal_clock (int cpu,u64 *steal,u64 *consigned) {struct kvm_steal_time *src;int version;
@@ -382,6 +382,7 @@ static void kvm_steal_clock(int cpu, u64 *steal) version = src->version;rmb (); *steal = src->steal; + *consigned = src->consigned;rmb (); }while ((version &1 ) || (version != src->version)); }
arch/x86/kernel/paravirt.c +2 -2
@@ -207,9 +207,9 @@ static void native_flush_tlb_single(unsigned long addr)struct static_key paravirt_steal_enabled;struct static_key paravirt_steal_rq_enabled; -static u64 native_steal_clock (int cpu) +static void native_steal_clock (int cpu,u64 *steal,u64 *consigned) { -return 0 ; + *steal = *consigned =0 ; }/* These are in entry.S */
arch/x86/kvm/x86.c +2 -0
@@ -1565,8 +1565,10 @@ static void record_steal_time(struct kvm_vcpu *vcpu)return ; vcpu->arch.st.steal.steal += vcpu->arch.st.accum_steal; + vcpu->arch.st.steal.consigned += vcpu->arch.st.accum_consigned; vcpu->arch.st.steal.version +=2 ; vcpu->arch.st.accum_steal =0 ; + vcpu->arch.st.accum_consigned =0 ;kvm_write_guest_cached (vcpu->kvm, &vcpu->arch.st.stime, &vcpu->arch.st.steal,sizeof (struct kvm_steal_time ));
include/linux/kernel_stat.h +1 -0
@@ -126,6 +126,7 @@ extern unsigned long long task_delta_exec(struct task_struct *);extern void account_user_time (struct task_struct *,cputime_t ,cputime_t );extern void account_system_time (struct task_struct *,int ,cputime_t ,cputime_t );extern void account_steal_time (cputime_t ); +extern void account_consigned_time (cputime_t );extern void account_idle_time (cputime_t );extern void account_process_tick (struct task_struct *,int user);
kernel/sched/cputime.c +19 -2
@@ -244,6 +244,18 @@ void account_system_time(struct task_struct *p, int hardirq_offset, }/* +* This accounts for the time that is split out of steal time. +* Consigned time represents the amount of time that the cpu was +* expected to be somewhere else. +*/ +void account_consigned_time (cputime_t cputime) +{ +u64 *cpustat = kcpustat_this_cpu->cpustat; + + cpustat[CPUTIME_CONSIGN ] += (__force u64 ) cputime; +} + +/* * Account for involuntary wait time. * @cputime: the cpu time spent in involuntary wait */
@@ -274,15 +286,20 @@ static __always_inline bool steal_account_process_tick(void)#ifdef CONFIG_PARAVIRT if (static_key_false (¶virt_steal_enabled)) {u64 steal, st =0 ; +u64 consigned, cs =0 ; -paravirt_steal_clock (smp_processor_id (), &steal); +paravirt_steal_clock (smp_processor_id (), &steal, &consigned); steal -=this_rq ()->prev_steal_time; + consigned -=this_rq ()->prev_consigned_time; st =steal_ticks (steal); + cs =steal_ticks (consigned);this_rq ()->prev_steal_time += st *TICK_NSEC ; +this_rq ()->prev_consigned_time += cs *TICK_NSEC ;account_steal_time (st); -return st; +account_consigned_time (cs); +return st || cs; }#endif return false;
kernel/sched/sched.h +2 -0
@@ -450,9 +450,11 @@ struct rq {#endif #ifdef CONFIG_PARAVIRT u64 prev_steal_time; +u64 prev_consigned_time;#endif #ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING u64 prev_steal_time_rq; +u64 prev_consigned_time_rq;#endif /* calc_load related fields */
PATCH 4/5 Add a timer to allow the separation of consigned from steal time.
In reply to Michael WolfAdd a timer to the host. This will define the period. During a period the first n ticks will go into the consigned bucket. Any other ticks that occur within the period will be placed in the stealtime bucket.
--- arch/x86/include/asm/kvm_host.h | 10 +++++++++ arch/x86/include/asm/paravirt.h | 2 +- arch/x86/kvm/x86.c | 42 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 52 insertions(+), 2 deletions(-)
arch/x86/include/asm/kvm_host.h +10 -0
@@ -41,6 +41,8 @@#define KVM_PIO_PAGE_OFFSET 1#define KVM_COALESCED_MMIO_PAGE_OFFSET 2 +#define KVM_STEAL_TIMER_DELAY 100000000UL +#define CR0_RESERVED_BITS \ (~(unsigned long)(X86_CR0_PE | X86_CR0_MP | X86_CR0_EM | X86_CR0_TS \ | X86_CR0_ET | X86_CR0_NE | X86_CR0_WP | X86_CR0_AM \
@@ -353,6 +355,14 @@ struct kvm_vcpu_arch {bool tpr_access_reporting;/* +* timer used to determine if the time should be counted as +* steal time or consigned time. +*/ +struct hrtimer steal_timer; +u64 current_consigned; +u64 consigned_limit; + +/* * Paging state of the vcpu * * If the vcpu runs in guest mode with two level paging this still saves
arch/x86/include/asm/paravirt.h +1 -1
@@ -196,7 +196,7 @@ struct static_key;extern struct static_key paravirt_steal_enabled;extern struct static_key paravirt_steal_rq_enabled; -static inline u64 paravirt_steal_clock (int cpu,u64 *steal,u64 *consigned) +static inline void paravirt_steal_clock (int cpu,u64 *steal,u64 *consigned) {PVOP_VCALL3 (pv_time_ops.steal_clock, cpu, steal, consigned); }
arch/x86/kvm/x86.c +41 -1
77 lines not on this page · raw message
PATCH 5/5 Add an ioctl to communicate the consign limit to the host.
In reply to Michael WolfAdd an ioctl to communicate the consign limit to the host.
--- CREDITS | 5 Documentation/arm64/memory.txt | 12 Documentation/cgroups/memory.txt | 4 .../devicetree/bindings/net/mdio-gpio.txt | 9 Documentation/filesystems/proc.txt | 16 Documentation/hwmon/fam15h_power | 2 Documentation/kernel-parameters.txt | 20 Documentation/networking/netdev-features.txt | 2 Documentation/scheduler/numa-problem.txt | 20 MAINTAINERS | 87 + Makefile | 2 arch/alpha/kernel/osf_sys.c | 6 arch/arm/boot/Makefile | 10 arch/arm/boot/dts/tegra30.dtsi | 4 arch/arm/include/asm/io.h | 4 arch/arm/include/asm/sched_clock.h | 2 arch/arm/include/asm/vfpmacros.h | 12 arch/arm/include/uapi/asm/hwcap.h | 3 arch/arm/kernel/sched_clock.c | 18 arch/arm/mach-at91/at91rm9200_devices.c | 2 arch/arm/mach-at91/at91sam9260_devices.c | 2 arch/arm/mach-at91/at91sam9261_devices.c | 2 arch/arm/mach-at91/at91sam9263_devices.c | 2 arch/arm/mach-at91/at91sam9g45_devices.c | 12 arch/arm/mach-davinci/dm644x.c | 3 arch/arm/mach-highbank/system.c | 3 arch/arm/mach-imx/clk-gate2.c | 2 arch/arm/mach-imx/ehci-imx25.c | 2 arch/arm/mach-imx/ehci-imx35.c | 2 arch/arm/mach-omap2/board-igep0020.c | 5 arch/arm/mach-omap2/clockdomains44xx_data.c | 2 arch/arm/mach-omap2/devices.c | 79 + arch/arm/mach-omap2/omap_hwmod.c | 63 + arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 36 arch/arm/mach-omap2/twl-common.c | 3 arch/arm/mach-omap2/vc.c | 2 arch/arm/mach-pxa/hx4700.c | 8 arch/arm/mach-pxa/spitz_pm.c | 8 arch/arm/mm/alignment.c | 2 arch/arm/plat-omap/include/plat/omap_hwmod.h | 6 arch/arm/tools/Makefile | 2 arch/arm/vfp/vfpmodule.c | 9 arch/arm/xen/enlighten.c | 11 arch/arm/xen/hypercall.S | 14 arch/arm64/Kconfig | 1 arch/arm64/include/asm/elf.h | 5 arch/arm64/include/asm/fpsimd.h | 5 arch/arm64/include/asm/io.h | 10 arch/arm64/include/asm/pgtable-hwdef.h | 6 arch/arm64/include/asm/pgtable.h | 40 - arch/arm64/include/asm/processor.h | 2 arch/arm64/include/asm/unistd.h | 1 arch/arm64/kernel/perf_event.c | 10 arch/arm64/kernel/process.c | 18 arch/arm64/kernel/smp.c | 3 arch/arm64/mm/init.c | 2 arch/frv/Kconfig | 1 arch/frv/boot/Makefile | 10 arch/frv/include/asm/unistd.h | 1 arch/frv/kernel/entry.S | 28 arch/frv/kernel/process.c | 5 arch/frv/mb93090-mb00/pci-dma-nommu.c | 1 arch/h8300/include/asm/cache.h | 3 arch/ia64/mm/init.c | 1 arch/m68k/include/asm/signal.h | 6 arch/mips/cavium-octeon/executive/cvmx-l2c.c | 900 ------------ arch/unicore32/include/asm/byteorder.h | 24 arch/unicore32/include/asm/kvm_para.h | 1 arch/unicore32/include/asm/sigcontext.h | 29 arch/unicore32/include/asm/unistd.h | 14 arch/x86/kvm/x86.c | 6 include/linux/kvm_host.h | 2 include/linux/raid/md_p.h | 301 ---- include/uapi/linux/kvm.h | 2 tools/perf/builtin-test.c | 1559 -------------------- tools/perf/util/dso-test-data.c | 153 -- tools/perf/util/parse-events-test.c | 1116 -------------- tools/testing/selftests/epoll/Makefile | 11 tools/testing/selftests/epoll/test_epoll.c | 344 ---- virt/kvm/kvm_main.c | 7 80 files changed, 471 insertions(+), 4677 deletions(-) delete mode 100644 arch/mips/cavium-octeon/executive/cvmx-l2c.c delete mode 100644 arch/unicore32/include/asm/byteorder.h delete mode 100644 arch/unicore32/include/asm/kvm_para.h delete mode 100644 arch/unicore32/include/asm/sigcontext.h delete mode 100644 arch/unicore32/include/asm/unistd.h delete mode 100644 include/linux/raid/md_p.h delete mode 100644 tools/perf/builtin-test.c delete mode 100644 tools/perf/util/dso-test-data.c delete mode 100644 tools/perf/util/parse-events-test.c delete mode 100644 tools/testing/selftests/epoll/Makefile delete mode 100644 tools/testing/selftests/epoll/test_epoll.c
CREDITS +5 -0
@@ -1824,6 +1824,11 @@ S: Kattreinstr 38 S: D-64295 S: Germany +N: Avi Kivity +E: [email protected] +D: Kernel-based Virtual Machine (KVM) +S: Ra'annana, Israel + N: Andi Kleen E: [email protected] U: http://www.halobates.de
Documentation/arm64/memory.txt +6 -6
@@ -27,17 +27,17 @@ Start End Size Use ----------------------------------------------------------------------- 0000000000000000 0000007fffffffff 512GB user -ffffff8000000000 ffffffbbfffcffff ~240GB vmalloc +ffffff8000000000 ffffffbbfffeffff ~240GB vmalloc -ffffffbbfffd0000 ffffffbcfffdffff 64KB [guard page] +ffffffbbffff0000 ffffffbbffffffff 64KB [guard page] -ffffffbbfffe0000 ffffffbcfffeffff 64KB PCI I/O space +ffffffbc00000000 ffffffbdffffffff 8GB vmemmap -ffffffbbffff0000 ffffffbcffffffff 64KB [guard page] +ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap] -ffffffbc00000000 ffffffbdffffffff 8GB vmemmap +ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space -ffffffbe00000000 ffffffbffbffffff ~8GB [guard, future vmmemap] +ffffffbbffff0000 ffffffbcffffffff ~2MB [guard] ffffffbffc000000 ffffffbfffffffff 64MB modules
Documentation/cgroups/memory.txt +4 -0
@@ -466,6 +466,10 @@ Note: 5.3 swappiness Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. +Please note that unlike the global swappiness, memcg knob set to 0 +really prevents from any swapping even if there is a swap storage +available. This might lead to memcg OOM killer if there are no file +pages to reclaim. Following cgroups' swappiness can't be changed. - root cgroup (uses /proc/sys/vm/swappiness).
Documentation/devicetree/bindings/net/mdio-gpio.txt +8 -1
@@ -8,9 +8,16 @@ gpios property as described in section VIII.1 in the following order: MDC, MDIO. +Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases" +node. + Example: -mdio { +aliases { + mdio-gpio0 = <&mdio0>; +}; + +mdio0: mdio { compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>;
Documentation/filesystems/proc.txt +12 -4
@@ -33,7 +33,7 @@ Table of Contents 2 Modifying System Parameters 3 Per-Process Parameters - 3.1 /proc/<pid>/oom_score_adj - Adjust the oom-killer + 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj - Adjust the oom-killer score 3.2 /proc/<pid>/oom_score - Display current oom-killer score 3.3 /proc/<pid>/io - Display the IO accounting fields
@@ -1320,10 +1320,10 @@ of the kernel. CHAPTER 3: PER-PROCESS PARAMETERS ------------------------------------------------------------------------------ -3.1 /proc/<pid>/oom_score_adj- Adjust the oom-killer score +3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score -------------------------------------------------------------------------------- -This file can be used to adjust the badness heuristic used to select which +These file can be used to adjust the badness heuristic used to select which process gets killed in out of memory conditions. The badness heuristic assigns a value to each candidate task ranging from 0
@@ -1361,6 +1361,12 @@ same system, cpuset, mempolicy, or memory controller resources to use at least equivalent to discounting 50% of the task's allowed memory from being considered as scoring against the task. +For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also +be used to tune the badness score. Its acceptable values range from -16 +(OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17 +(OOM_DISABLE) to disable oom killing entirely for that task. Its value is +scaled linearly with /proc/<pid>/oom_score_adj. + The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last value set by a CAP_SYS_RESOURCE process. To reduce the value any lower requires CAP_SYS_RESOURCE.
@@ -1375,7 +1381,9 @@ minimal amount of work. ------------------------------------------------------------- This file can be used to check the current score used by the oom-killer is for -any given <pid>. +any given <pid>. Use it together with /proc/<pid>/oom_score_adj to tune which +process should be killed in an out-of-memory situation. + 3.3 /proc/<pid>/io - Display the IO accounting fields -------------------------------------------------------
Documentation/hwmon/fam15h_power +1 -1
@@ -10,7 +10,7 @@ Supported chips: BIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processors (not yet published) -Author: Andreas Herrmann <[email protected]> +Author: Andreas Herrmann <[email protected]> Description -----------
Documentation/kernel-parameters.txt +20 -0
@@ -1304,6 +1304,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. lapic [X86-32,APIC] Enable the local APIC even if BIOS disabled it. + lapic= [x86,APIC] "notscdeadline" Do not use TSC deadline + value for LAPIC timer one-shot implementation. Default + back to the programmable timer unit in the LAPIC. + lapic_timer_c2_ok [X86,APIC] trust the local apic timer in C2 power state.
@@ -2859,6 +2863,22 @@ bytes respectively. Such letter suffixes can also be entirely omitted. to facilitate early boot debugging. See also Documentation/trace/events.txt + trace_options=[option-list] + [FTRACE] Enable or disable tracer options at boot. + The option-list is a comma delimited list of options + that can be enabled or disabled just as if you were + to echo the option name into + + /sys/kernel/debug/tracing/trace_options + + For example, to enable stacktrace option (to dump the + stack trace of each event), add to the command line: + + trace_options=stacktrace + + See also Documentation/trace/ftrace.txt "trace options" + section. + transparent_hugepage= [KNL] Format: [always|madvise|never]
Documentation/networking/netdev-features.txt +1 -1
@@ -164,4 +164,4 @@ read the CRC recorded by the NIC on receipt of the packet. This requests that the NIC receive all possible frames, including errored frames (such as bad FCS, etc). This can be helpful when sniffing a link with bad packets on it. Some NICs may receive more packets if also put into normal -PROMISC mdoe. +PROMISC mode.
Documentation/scheduler/numa-problem.txt +13 -7
@@ -133,6 +133,8 @@ XXX properties of this M vs a potential optimal 2b) migrate memory towards 'n_i' using 2 samples. +XXX include the statistical babble on double sampling somewhere near + This separates pages into those that will migrate and those that will not due to the two samples not matching. We could consider the first to be of 'p_i' (private) and the second to be of 's_i' (shared).
@@ -142,7 +144,17 @@ This interpretation can be motivated by the previously observed property that 's_i' (shared). (here we loose the need for memory limits again, since it becomes indistinguishable from shared). -XXX include the statistical babble on double sampling somewhere near + 2c) use cpu samples instead of node samples + +The problem with sampling on node granularity is that one looses 's_i' for +the local node, since one cannot distinguish between two accesses from the +same node. + +By increasing the granularity to per-cpu we gain the ability to have both an +'s_i' and 'p_i' per node. Since we do all task placement per-cpu as well this +seems like a natural match. The line where we overcommit cpus is where we loose +granularity again, but when we loose overcommit we naturally spread tasks. +Therefore it should work out nicely. This reduces the problem further; we loose 'M' as per 2a, it further reduces the 'T_k,l' (interconnect traffic) term to only include shared (since per the
@@ -150,12 +162,6 @@ above all private will be local): T_k,l = \Sum_i bs_i,l for every n_i = k, l != k -[ more or less matches the state of sched/numa and describes its remaining - problems and assumptions. It should work well for tasks without significant - shared memory usage between tasks. ] - -Possible future directions: - Motivated by the form of 'T_k,l', try and obtain each term of the sum, so we can evaluate it;
MAINTAINERS +73 -14
157 lines not on this page · raw message
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 3 PATCHLEVEL = 7 SUBLEVEL = 0 -EXTRAVERSION = -rc3 +EXTRAVERSION = -rc6 NAME = Terrified Chipmunk # *DOCUMENTATION*
arch/alpha/kernel/osf_sys.c +3 -3
@@ -445,7 +445,7 @@ struct procfs_args {* unhappy with OSF UFS. [CHECKME] */ static int -osf_ufs_mount (char *dirname,struct ufs_args __user *args,int flags) +osf_ufs_mount (const char *dirname,struct ufs_args __user *args,int flags) {int retval;struct cdfs_args tmp;
@@ -465,7 +465,7 @@ osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags) }static int -osf_cdfs_mount (char *dirname,struct cdfs_args __user *args,int flags) +osf_cdfs_mount (const char *dirname,struct cdfs_args __user *args,int flags) {int retval;struct cdfs_args tmp;
@@ -485,7 +485,7 @@ osf_cdfs_mount(char *dirname, struct cdfs_args __user *args, int flags) }static int -osf_procfs_mount (char *dirname,struct procfs_args __user *args,int flags) +osf_procfs_mount (const char *dirname,struct procfs_args __user *args,int flags) {struct procfs_args tmp;
arch/arm/boot/Makefile +5 -5
@@ -33,7 +33,7 @@ ifeq ($(CONFIG_XIP_KERNEL),y) $(obj)/xipImage: vmlinux FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' + @$(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' $(obj)/Image $(obj)/zImage: FORCE @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)'
@@ -48,14 +48,14 @@ $(obj)/xipImage: FORCE $(obj)/Image: vmlinux FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready' + @$(kecho) ' Kernel: $@ is ready' $(obj)/compressed/vmlinux: $(obj)/Image FORCE $(Q)$(MAKE) $(build)=$(obj)/compressed $@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready' + @$(kecho) ' Kernel: $@ is ready' endif
@@ -90,7 +90,7 @@ fi $(obj)/uImage: $(obj)/zImage FORCE @$(check_for_multiple_loadaddr) $(call if_changed,uimage) - $(kecho) ' Image $@ is ready' + @$(kecho) ' Image $@ is ready' $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE $(Q)$(MAKE) $(build)=$(obj)/bootp $@
@@ -98,7 +98,7 @@ $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE $(obj)/bootpImage: $(obj)/bootp/bootp FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready' + @$(kecho) ' Kernel: $@ is ready' PHONY += initrd FORCE initrd:
arch/arm/boot/dts/tegra30.dtsi +2 -2
@@ -73,8 +73,8 @@ pinmux: pinmux { compatible = "nvidia,tegra30-pinmux"; - reg = <0x70000868 0xd0 /* Pad control registers */ - 0x70003000 0x3e0>; /* Mux registers */ + reg = <0x70000868 0xd4 /* Pad control registers */ + 0x70003000 0x3e4>; /* Mux registers */ }; serial@70006000 {
arch/arm/include/asm/io.h +2 -2
@@ -64,7 +64,7 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);static inline void __raw_writew (u16 val,volatile void __iomem *addr) { asmvolatile ("strh %1, %0" - :"+Qo" (*(volatile u16 __force *)addr) + :"+Q" (*(volatile u16 __force *)addr) :"r" (val)); }
@@ -72,7 +72,7 @@ static inline u16 __raw_readw(const volatile void __iomem *addr) {u16 val; asmvolatile ("ldrh %1, %0" - :"+Qo" (*(volatile u16 __force *)addr), + :"+Q" (*(volatile u16 __force *)addr),"=r" (val));return val; }
arch/arm/include/asm/sched_clock.h +0 -2
@@ -10,7 +10,5 @@extern void sched_clock_postinit (void );extern void setup_sched_clock (u32 (*read)(void ),int bits,unsigned long rate); -extern void setup_sched_clock_needs_suspend (u32 (*read)(void ),int bits, -unsigned long rate);#endif
arch/arm/include/asm/vfpmacros.h +6 -6
@@ -27,9 +27,9 @@#if __LINUX_ARM_ARCH__ <=6 ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] - tst \tmp, #HWCAP_VFPv3D16 - ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} - addne \base, \base, #32*4 @ step over unused register space + tst \tmp, #HWCAP_VFPD32 + ldcnel p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} + addeq \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field
@@ -51,9 +51,9 @@#if __LINUX_ARM_ARCH__ <=6 ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] - tst \tmp, #HWCAP_VFPv3D16 - stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} - addne \base, \base, #32*4 @ step over unused register space + tst \tmp, #HWCAP_VFPD32 + stcnel p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} + addeq \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field
arch/arm/include/uapi/asm/hwcap.h +2 -1
@@ -18,11 +18,12 @@#define HWCAP_THUMBEE (1 << 11)#define HWCAP_NEON (1 << 12)#define HWCAP_VFPv3 (1 << 13) -#define HWCAP_VFPv3D16 (1 << 14) +#define HWCAP_VFPv3D16 (1 << 14)/* also set for VFPv4-D16 */ #define HWCAP_TLS (1 << 15)#define HWCAP_VFPv4 (1 << 16)#define HWCAP_IDIVA (1 << 17)#define HWCAP_IDIVT (1 << 18) +#define HWCAP_VFPD32 (1 << 19)/* set if VFP has 32 regs (not 16) */ #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
arch/arm/kernel/sched_clock.c +4 -14
@@ -107,13 +107,6 @@ static void sched_clock_poll(unsigned long wrap_ticks)update_sched_clock (); } -void __init setup_sched_clock_needs_suspend (u32 (*read)(void ),int bits, -unsigned long rate) -{ -setup_sched_clock (read, bits, rate); - cd.needs_suspend = true; -} -void __init setup_sched_clock (u32 (*read)(void ),int bits,unsigned long rate) {unsigned long r, w;
@@ -189,18 +182,15 @@ void __init sched_clock_postinit(void)static int sched_clock_suspend (void ) {sched_clock_poll (sched_clock_timer.data); -if (cd.needs_suspend) - cd.suspended = true; + cd.suspended = true;return 0 ; }static void sched_clock_resume (void ) { -if (cd.needs_suspend) { - cd.epoch_cyc =read_sched_clock (); - cd.epoch_cyc_copy = cd.epoch_cyc; - cd.suspended = false; - } + cd.epoch_cyc =read_sched_clock (); + cd.epoch_cyc_copy = cd.epoch_cyc; + cd.suspended = false; }static struct syscore_ops sched_clock_ops = {
arch/arm/mach-at91/at91rm9200_devices.c +1 -1
@@ -68,7 +68,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }
arch/arm/mach-at91/at91sam9260_devices.c +1 -1
@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }
arch/arm/mach-at91/at91sam9261_devices.c +1 -1
@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }
arch/arm/mach-at91/at91sam9263_devices.c +1 -1
@@ -78,7 +78,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }
arch/arm/mach-at91/at91sam9g45_devices.c +6 -6
@@ -1841,8 +1841,8 @@ static struct resource sha_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };
@@ -1874,8 +1874,8 @@ static struct resource tdes_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };
@@ -1910,8 +1910,8 @@ static struct resource aes_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };
arch/arm/mach-davinci/dm644x.c +1 -2
@@ -713,8 +713,7 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,break ;case VPBE_ENC_CUSTOM_TIMINGS :if (pclock <=27000000 ) { - v |=DM644X_VPSS_MUXSEL_PLL2_MODE | -DM644X_VPSS_DACCLKEN ; + v |=DM644X_VPSS_DACCLKEN ;writel (v,DAVINCI_SYSMOD_VIRT (SYSMOD_VPSS_CLKCTL )); }else {/*
arch/arm/mach-highbank/system.c +2 -1
@@ -28,6 +28,7 @@ void highbank_restart(char mode, const char *cmd)hignbank_set_pwr_soft_reset ();scu_power_mode (scu_base_addr,SCU_PM_POWEROFF ); -cpu_do_idle (); +while (1 ) +cpu_do_idle (); }
arch/arm/mach-imx/clk-gate2.c +1 -1
@@ -112,7 +112,7 @@ struct clk *clk_register_gate2(struct device *dev, const char *name, clk =clk_register (dev, &gate->hw);if (IS_ERR (clk)) -kfree (clk); +kfree (gate);return clk; }
arch/arm/mach-imx/ehci-imx25.c +1 -1
@@ -30,7 +30,7 @@#define MX25_H1_SIC_SHIFT 21#define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT)#define MX25_H1_PP_BIT (1 << 18) -#define MX25_H1_PM_BIT (1 << 8) +#define MX25_H1_PM_BIT (1 << 16)#define MX25_H1_IPPUE_UP_BIT (1 << 7)#define MX25_H1_IPPUE_DOWN_BIT (1 << 6)#define MX25_H1_TLL_BIT (1 << 5)
arch/arm/mach-imx/ehci-imx35.c +1 -1
@@ -30,7 +30,7 @@#define MX35_H1_SIC_SHIFT 21#define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT)#define MX35_H1_PP_BIT (1 << 18) -#define MX35_H1_PM_BIT (1 << 8) +#define MX35_H1_PM_BIT (1 << 16)#define MX35_H1_IPPUE_UP_BIT (1 << 7)#define MX35_H1_IPPUE_DOWN_BIT (1 << 6)#define MX35_H1_TLL_BIT (1 << 5)
arch/arm/mach-omap2/board-igep0020.c +5 -0
@@ -580,6 +580,11 @@ static void __init igep_wlan_bt_init(void) }else return ; +/* Make sure that the GPIO pins are muxed correctly */ +omap_mux_init_gpio (igep_wlan_bt_gpios[0 ].gpio,OMAP_PIN_OUTPUT ); +omap_mux_init_gpio (igep_wlan_bt_gpios[1 ].gpio,OMAP_PIN_OUTPUT ); +omap_mux_init_gpio (igep_wlan_bt_gpios[2 ].gpio,OMAP_PIN_OUTPUT ); + err =gpio_request_array (igep_wlan_bt_gpios,ARRAY_SIZE (igep_wlan_bt_gpios));if (err) {
arch/arm/mach-omap2/clockdomains44xx_data.c +1 -1
@@ -359,7 +359,7 @@ static struct clockdomain iss_44xx_clkdm = { .clkdm_offs = OMAP4430_CM2_CAM_CAM_CDOFFS, .wkdep_srcs = iss_wkup_sleep_deps, .sleepdep_srcs = iss_wkup_sleep_deps, - .flags = CLKDM_CAN_HWSUP_SWSUP, + .flags = CLKDM_CAN_SWSUP, };static struct clockdomain l3_dss_44xx_clkdm = {
arch/arm/mach-omap2/devices.c +79 -0
97 lines not on this page · raw message
arch/arm/mach-omap2/omap_hwmod.c +49 -14
93 lines not on this page · raw message
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +36 -0
@@ -21,6 +21,7 @@#include <linux/io.h> #include <linux/platform_data/gpio-omap.h> #include <linux/power/smartreflex.h> +#include <linux/platform_data/omap_ocp2scp.h> #include <plat/omap_hwmod.h> #include <plat/i2c.h>
@@ -2125,6 +2126,14 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = { .name = "mcpdm", .class = &omap44xx_mcpdm_hwmod_class, .clkdm_name = "abe_clkdm", +/* +* It's suspected that the McPDM requires an off-chip main +* functional clock, controlled via I2C. This IP block is +* currently reset very early during boot, before I2C is +* available, so it doesn't seem that we have any choice in +* the kernel other than to avoid resetting it. +*/ + .flags = HWMOD_EXT_OPT_MAIN_CLK, .mpu_irqs = omap44xx_mcpdm_irqs, .sdma_reqs = omap44xx_mcpdm_sdma_reqs, .main_clk = "mcpdm_fck",
@@ -2681,6 +2690,32 @@ static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = { .sysc = &omap44xx_ocp2scp_sysc, }; +/* ocp2scp dev_attr */ +static struct resource omap44xx_usb_phy_and_pll_addrs[] = { + { + .name ="usb_phy" , + .start =0x4a0ad080 , + .end =0x4a0ae000 , + .flags =IORESOURCE_MEM , + }, + { +/* XXX: Remove this once control module driver is in place */ + .name ="ctrl_dev" , + .start =0x4a002300 , + .end =0x4a002303 , + .flags =IORESOURCE_MEM , + }, + { } +}; + +static struct omap_ocp2scp_dev ocp2scp_dev_attr[] = { + { + .drv_name ="omap-usb2" , + .res = omap44xx_usb_phy_and_pll_addrs, + }, + { } +}; +/* ocp2scp_usb_phy */ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { .name ="ocp2scp_usb_phy" ,
@@ -2694,6 +2729,7 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { .modulemode = MODULEMODE_HWCTRL, }, }, + .dev_attr = ocp2scp_dev_attr, };/*
arch/arm/mach-omap2/twl-common.c +2 -1
@@ -73,6 +73,7 @@ void __init omap4_pmic_init(const char *pmic_type, {/* PMIC part*/ omap_mux_init_signal ("sys_nirq1" ,OMAP_PIN_INPUT_PULLUP |OMAP_PIN_OFF_WAKEUPENABLE ); +omap_mux_init_signal ("fref_clk0_out.sys_drm_msecure" ,OMAP_PIN_OUTPUT );omap_pmic_init (1 ,400 , pmic_type,7 +OMAP44XX_IRQ_GIC_START , pmic_data);/* Register additional devices on i2c1 bus if needed */
@@ -366,7 +367,7 @@ static struct regulator_init_data omap4_clk32kg_idata = { };static struct regulator_consumer_supply omap4_vdd1_supply[] = { -REGULATOR_SUPPLY ("vcc" ,"mpu.0" ), +REGULATOR_SUPPLY ("vcc" ,"cpu0" ), };static struct regulator_consumer_supply omap4_vdd2_supply[] = {
arch/arm/mach-omap2/vc.c +1 -1
@@ -264,7 +264,7 @@ static void __init omap_vc_i2c_init(struct voltagedomain *voltdm)if (initialized) {if (voltdm->pmic->i2c_high_speed != i2c_high_speed) -pr_warn ("%s: I2C config for vdd_%s does not match other channels (%u)." , +pr_warn ("%s: I2C config for vdd_%s does not match other channels (%u).\n" , __func__, voltdm->name, i2c_high_speed);return ; }
arch/arm/mach-pxa/hx4700.c +7 -1
@@ -28,6 +28,7 @@#include <linux/mfd/asic3.h> #include <linux/mtd/physmap.h> #include <linux/pda_power.h> +#include <linux/pwm.h> #include <linux/pwm_backlight.h> #include <linux/regulator/driver.h> #include <linux/regulator/gpio-regulator.h>
@@ -556,7 +557,7 @@ static struct platform_device hx4700_lcd = {*/ static struct platform_pwm_backlight_data backlight_data = { - .pwm_id =1 , + .pwm_id =-1 ,/* Superseded by pwm_lookup */ .max_brightness =200 , .dft_brightness =100 , .pwm_period_ns =30923 ,
@@ -571,6 +572,10 @@ static struct platform_device backlight = { }, }; +static struct pwm_lookup hx4700_pwm_lookup[] = { +PWM_LOOKUP ("pxa27x-pwm.1" ,0 ,"pwm-backlight" ,NULL ), +}; +/* * USB "Transceiver" */
@@ -872,6 +877,7 @@ static void __init hx4700_init(void)pxa_set_stuart_info (NULL );platform_add_devices (devices,ARRAY_SIZE (devices)); +pwm_add_table (hx4700_pwm_lookup,ARRAY_SIZE (hx4700_pwm_lookup));pxa_set_ficp_info (&ficp_info);pxa27x_set_i2c_power_info (NULL );
arch/arm/mach-pxa/spitz_pm.c +2 -6
@@ -86,10 +86,7 @@ static void spitz_discharge1(int on)gpio_set_value (SPITZ_GPIO_LED_GREEN , on); } -static unsigned long gpio18_config[] = { -GPIO18_RDY , -GPIO18_GPIO , -}; +static unsigned long gpio18_config =GPIO18_GPIO ;static void spitz_presuspend (void ) {
@@ -112,7 +109,7 @@ static void spitz_presuspend(void)PGSR3 &= ~SPITZ_GPIO_G3_STROBE_BIT ;PGSR2 |=GPIO_bit (SPITZ_GPIO_KEY_STROBE0 ); -pxa2xx_mfp_config (&gpio18_config[0 ],1 ); +pxa2xx_mfp_config (&gpio18_config,1 );gpio_request_one (18 ,GPIOF_OUT_INIT_HIGH ,"Unknown" );gpio_free (18 );
@@ -131,7 +128,6 @@ static void spitz_presuspend(void)static void spitz_postsuspend (void ) { -pxa2xx_mfp_config (&gpio18_config[1 ],1 ); }static int spitz_should_wakeup (unsigned int resume_on_alarm)
arch/arm/mm/alignment.c +1 -1
@@ -745,7 +745,7 @@ do_alignment_t32_to_handler(unsigned long *pinstr, struct pt_regs *regs,static int do_alignment (unsigned long addr,unsigned int fsr,struct pt_regs *regs) { -union offset_union offset; +union offset_union uninitialized_var (offset );unsigned long instr =0 , instrptr;int (*handler)(unsigned long addr,unsigned long instr,struct pt_regs *regs);unsigned int type;
arch/arm/plat-omap/include/plat/omap_hwmod.h +6 -0
@@ -443,6 +443,11 @@ struct omap_hwmod_omap4_prcm {* in order to complete the reset. Optional clocks will be disabled * again after the reset. * HWMOD_16BIT_REG: Module has 16bit registers +* HWMOD_EXT_OPT_MAIN_CLK: The only main functional clock source for +* this IP block comes from an off-chip source and is not always +* enabled. This prevents the hwmod code from being able to +* enable and reset the IP block early. XXX Eventually it should +* be possible to query the clock framework for this information. */ #define HWMOD_SWSUP_SIDLE (1 << 0)#define HWMOD_SWSUP_MSTANDBY (1 << 1)
@@ -453,6 +458,7 @@ struct omap_hwmod_omap4_prcm {#define HWMOD_NO_IDLEST (1 << 6)#define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7)#define HWMOD_16BIT_REG (1 << 8) +#define HWMOD_EXT_OPT_MAIN_CLK (1 << 9)/* * omap_hwmod._int_flags definitions
arch/arm/tools/Makefile +1 -1
@@ -5,6 +5,6 @@ # include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types - $(kecho) ' Generating $@' + @$(kecho) ' Generating $@' @mkdir -p $(dir $@) $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
arch/arm/vfp/vfpmodule.c +6 -3
@@ -701,11 +701,14 @@ static int __init vfp_init(void) elf_hwcap |= HWCAP_VFPv3;/* -* Check for VFPv3 D16. CPUs in this configuration -* only have 16 x 64bit registers. +* Check for VFPv3 D16 and VFPv4 D16. CPUs in +* this configuration only have 16 x 64bit +* registers. */ if (((fmrx (MVFR0 ) &MVFR0_A_SIMD_MASK )) ==1 ) - elf_hwcap |= HWCAP_VFPv3D16; + elf_hwcap |= HWCAP_VFPv3D16;/* also v4-D16 */ +else + elf_hwcap |= HWCAP_VFPD32; }#endif /*
arch/arm/xen/enlighten.c +11 -0
@@ -166,3 +166,14 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) *pages =NULL ; }EXPORT_SYMBOL_GPL (free_xenballooned_pages); + +/* In the hypervisor.S file. */ +EXPORT_SYMBOL_GPL (HYPERVISOR_event_channel_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_grant_table_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_xen_version); +EXPORT_SYMBOL_GPL (HYPERVISOR_console_io); +EXPORT_SYMBOL_GPL (HYPERVISOR_sched_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_hvm_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_memory_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_physdev_op); +EXPORT_SYMBOL_GPL (privcmd_call);
arch/arm/xen/hypercall.S +5 -9
@@ -48,20 +48,16 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/opcodes-virt.h> #include <xen/interface/xen.h> -/* HVC 0xEA1 */ -#ifdef CONFIG_THUMB2_KERNEL -#define xen_hvc .word 0xf7e08ea1 -#else -#define xen_hvc .word 0xe140ea71 -#endif +#define XEN_IMM 0xEA1 #define HYPERCALL_SIMPLE(hypercall) \ ENTRY(HYPERVISOR_##hypercall) \ mov r12, #__HYPERVISOR_##hypercall; \ - xen_hvc; \ + __HVC(XEN_IMM); \ mov pc, lr; \ ENDPROC(HYPERVISOR_##hypercall)
@@ -76,7 +72,7 @@ ENTRY(HYPERVISOR_##hypercall) \ stmdb sp!, {r4} \ ldr r4, [sp, #4] \ mov r12, #__HYPERVISOR_##hypercall; \ - xen_hvc \ + __HVC(XEN_IMM); \ ldm sp!, {r4} \ mov pc, lr \ ENDPROC(HYPERVISOR_##hypercall)
@@ -100,7 +96,7 @@ ENTRY(privcmd_call) mov r2, r3 ldr r3, [sp, #8] ldr r4, [sp, #4] - xen_hvc + __HVC(XEN_IMM) ldm sp!, {r4} mov pc, lr ENDPROC(privcmd_call);
arch/arm64/Kconfig +1 -0
@@ -1,6 +1,7 @@ config ARM64 def_bool y select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE + select ARCH_WANT_COMPAT_IPC_PARSE_VERSION select GENERIC_CLOCKEVENTS select GENERIC_HARDIRQS_NO_DEPRECATED select GENERIC_IOMAP
arch/arm64/include/asm/elf.h +1 -4
@@ -25,12 +25,10 @@#include <asm/user.h> typedef unsigned long elf_greg_t ; -typedef unsigned long elf_freg_t [3 ];#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))typedef elf_greg_t elf_gregset_t [ELF_NGREG ]; - -typedef struct user_fp elf_fpregset_t ; +typedef struct user_fpsimd_state elf_fpregset_t ;#define EM_AARCH64 183
@@ -87,7 +85,6 @@ typedef struct user_fp elf_fpregset_t;#define R_AARCH64_MOVW_PREL_G2_NC 292#define R_AARCH64_MOVW_PREL_G3 293 -/* * These are used to set parameters in the core dumps. */
arch/arm64/include/asm/fpsimd.h +2 -3
@@ -25,9 +25,8 @@* - FPSR and FPCR * - 32 128-bit data registers * -* Note that user_fp forms a prefix of this structure, which is relied -* upon in the ptrace FP/SIMD accessors. struct user_fpsimd_state must -* form a prefix of struct fpsimd_state. +* Note that user_fpsimd forms a prefix of this structure, which is +* relied upon in the ptrace FP/SIMD accessors. */ struct fpsimd_state { union {
arch/arm64/include/asm/io.h +5 -5
@@ -114,7 +114,7 @@ static inline u64 __raw_readq(const volatile void __iomem *addr)* I/O port access primitives. */ #define IO_SPACE_LIMIT 0xffff -#define PCI_IOBASE ((void __iomem *)0xffffffbbfffe0000UL) +#define PCI_IOBASE ((void __iomem *)(MODULES_VADDR - SZ_2M))static inline u8 inb (unsigned long addr) {
@@ -222,12 +222,12 @@ extern void __iomem *__ioremap(phys_addr_t phys_addr, size_t size, pgprot_t protextern void __iounmap (volatile void __iomem *addr);#define PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_DIRTY) -#define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_XN | PTE_ATTRINDX(MT_DEVICE_nGnRE)) +#define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE))#define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC)) -#define ioremap (addr, size) __ioremap((addr), (size), PROT_DEVICE_nGnRE) -#define ioremap_nocache (addr, size) __ioremap((addr), (size), PROT_DEVICE_nGnRE) -#define ioremap_wc (addr, size) __ioremap((addr), (size), PROT_NORMAL_NC) +#define ioremap (addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) +#define ioremap_nocache (addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) +#define ioremap_wc (addr, size) __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))#define iounmap __iounmap#define ARCH_HAS_IOREMAP_WC
arch/arm64/include/asm/pgtable-hwdef.h +4 -2
@@ -38,7 +38,8 @@#define PMD_SECT_S (_AT(pmdval_t, 3) << 8)#define PMD_SECT_AF (_AT(pmdval_t, 1) << 10)#define PMD_SECT_NG (_AT(pmdval_t, 1) << 11) -#define PMD_SECT_XN (_AT(pmdval_t, 1) << 54) +#define PMD_SECT_PXN (_AT(pmdval_t, 1) << 53) +#define PMD_SECT_UXN (_AT(pmdval_t, 1) << 54)/* * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers).
@@ -57,7 +58,8 @@#define PTE_SHARED (_AT(pteval_t, 3) << 8)/* SH[1:0], inner shareable */ #define PTE_AF (_AT(pteval_t, 1) << 10)/* Access Flag */ #define PTE_NG (_AT(pteval_t, 1) << 11)/* nG */ -#define PTE_XN (_AT(pteval_t, 1) << 54)/* XN */ +#define PTE_PXN (_AT(pteval_t, 1) << 53)/* Privileged XN */ +#define PTE_UXN (_AT(pteval_t, 1) << 54)/* User XN */ /* * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers).
arch/arm64/include/asm/pgtable.h +20 -20
@@ -62,23 +62,23 @@ extern pgprot_t pgprot_default;#define _MOD_PROT (p, b) __pgprot(pgprot_val(p) | (b)) -#define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_XN | PTE_RDONLY) -#define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN) -#define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG) -#define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define PAGE_COPY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_RDONLY) -#define PAGE_READONLY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define PAGE_READONLY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_RDONLY) -#define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_XN | PTE_DIRTY) -#define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_DIRTY) - -#define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_XN | PTE_RDONLY) -#define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN) -#define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG) -#define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define __PAGE_COPY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_RDONLY) -#define __PAGE_READONLY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define __PAGE_READONLY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_RDONLY) +#define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) +#define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN) +#define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define PAGE_COPY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) +#define PAGE_READONLY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define PAGE_READONLY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) +#define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_PXN | PTE_UXN | PTE_DIRTY) +#define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_UXN | PTE_DIRTY) + +#define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) +#define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN) +#define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define __PAGE_COPY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) +#define __PAGE_READONLY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define __PAGE_READONLY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY)#endif /* __ASSEMBLY__ */
@@ -130,10 +130,10 @@ extern struct page *empty_zero_page;#define pte_young (pte) (pte_val(pte) & PTE_AF)#define pte_special (pte) (pte_val(pte) & PTE_SPECIAL)#define pte_write (pte) (!(pte_val(pte) & PTE_RDONLY)) -#define pte_exec (pte) (!(pte_val(pte) & PTE_XN)) +#define pte_exec (pte) (!(pte_val(pte) & PTE_UXN))#define pte_present_exec_user (pte) \ - ((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_XN)) == \ + ((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_UXN)) == \ (PTE_VALID | PTE_USER))#define PTE_BIT_FUNC (fn,op) \
@@ -262,7 +262,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)static inline pte_t pte_modify (pte_t pte,pgprot_t newprot) { -const pteval_t mask =PTE_USER |PTE_XN |PTE_RDONLY ; +const pteval_t mask =PTE_USER |PTE_PXN |PTE_UXN |PTE_RDONLY ;pte_val (pte) = (pte_val (pte) & ~mask) | (pgprot_val (newprot) & mask);return pte; }
arch/arm64/include/asm/processor.h +2 -0
@@ -43,6 +43,8 @@#else #define STACK_TOP STACK_TOP_MAX#endif /* CONFIG_COMPAT */ + +#define ARCH_LOW_ADDRESS_LIMIT PHYS_MASK#endif /* __KERNEL__ */ struct debug_info {
arch/arm64/include/asm/unistd.h +0 -1
@@ -14,7 +14,6 @@* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifdef CONFIG_COMPAT -#define __ARCH_WANT_COMPAT_IPC_PARSE_VERSION#define __ARCH_WANT_COMPAT_STAT64#define __ARCH_WANT_SYS_GETHOSTNAME#define __ARCH_WANT_SYS_PAUSE
arch/arm64/kernel/perf_event.c +2 -8
@@ -613,17 +613,11 @@ enum armv8_pmuv3_perf_types {ARMV8_PMUV3_PERFCTR_BUS_ACCESS =0x19 ,ARMV8_PMUV3_PERFCTR_MEM_ERROR =0x1A , ARMV8_PMUV3_PERFCTR_BUS_CYCLES = 0x1D, - -/* -* This isn't an architected event. -* We detect this event number and use the cycle counter instead. -*/ - ARMV8_PMUV3_PERFCTR_CPU_CYCLES = 0xFF, };/* PMUv3 HW events mapping. */ static const unsigned armv8_pmuv3_perf_map[PERF_COUNT_HW_MAX ] = { - [PERF_COUNT_HW_CPU_CYCLES ] =ARMV8_PMUV3_PERFCTR_CPU_CYCLES , + [PERF_COUNT_HW_CPU_CYCLES ] =ARMV8_PMUV3_PERFCTR_CLOCK_CYCLES , [PERF_COUNT_HW_INSTRUCTIONS ] =ARMV8_PMUV3_PERFCTR_INSTR_EXECUTED , [PERF_COUNT_HW_CACHE_REFERENCES ] =ARMV8_PMUV3_PERFCTR_L1_DCACHE_ACCESS , [PERF_COUNT_HW_CACHE_MISSES] = ARMV8_PMUV3_PERFCTR_L1_DCACHE_REFILL,
@@ -1106,7 +1100,7 @@ static int armv8pmu_get_event_idx(struct pmu_hw_events *cpuc,unsigned long evtype = event->config_base &ARMV8_EVTYPE_EVENT ;/* Always place a cycle counter into the cycle counter. */ -if (evtype ==ARMV8_PMUV3_PERFCTR_CPU_CYCLES ) { +if (evtype ==ARMV8_PMUV3_PERFCTR_CLOCK_CYCLES ) {if (test_and_set_bit (ARMV8_IDX_CYCLE_COUNTER , cpuc->used_mask))return -EAGAIN ;
arch/arm64/kernel/process.c +0 -18
@@ -310,24 +310,6 @@ struct task_struct *__switch_to(struct task_struct *prev, }/* -* Fill in the task's elfregs structure for a core dump. -*/ -int dump_task_regs (struct task_struct *t,elf_gregset_t *elfregs) -{ -elf_core_copy_regs (elfregs,task_pt_regs (t)); -return 1 ; -} - -/* -* fill in the fpe structure for a core dump... -*/ -int dump_fpu (struct pt_regs *regs,struct user_fp *fp) -{ -return 0 ; -} -EXPORT_SYMBOL (dump_fpu); - -/* * Shuffle the argument into the correct register before calling the * thread function. x1 is the thread argument, x2 is the pointer to * the thread function, and x3 points to the exit function.
arch/arm64/kernel/smp.c +1 -2
@@ -211,8 +211,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void)* before we continue. */ set_cpu_online (cpu, true); -while (!cpu_active (cpu)) -cpu_relax (); +complete (&cpu_running);/* * OK, it's off to the idle thread for us
arch/arm64/mm/init.c +1 -1
@@ -80,7 +80,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)#ifdef CONFIG_ZONE_DMA32 /* 4GB maximum for 32-bit only capable devices */ max_dma32 =min (max,MAX_DMA32_PFN ); - zone_size[ZONE_DMA32 ] = max_dma32 - min; + zone_size[ZONE_DMA32 ] =max (min, max_dma32) - min;#endif zone_size[ZONE_NORMAL ] = max - max_dma32;
arch/frv/Kconfig +1 -0
@@ -13,6 +13,7 @@ config FRV select GENERIC_CPU_DEVICES select ARCH_WANT_IPC_PARSE_VERSION select GENERIC_KERNEL_THREAD + select GENERIC_KERNEL_EXECVE config ZONE_DMA bool
arch/frv/boot/Makefile +6 -4
@@ -17,6 +17,8 @@ PARAMS_PHYS = 0x0207c000 INITRD_PHYS = 0x02180000 INITRD_VIRT = 0x02180000 +OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment + # # If you don't define ZRELADDR above, # then it defaults to ZTEXTADDR
@@ -32,18 +34,18 @@ Image: $(obj)/Image targets: $(obj)/Image $(obj)/Image: vmlinux FORCE - $(OBJCOPY) -O binary -R .note -R .comment -S vmlinux $@ + $(OBJCOPY) $(OBJCOPYFLAGS) -S vmlinux $@ #$(obj)/Image: $(CONFIGURE) $(SYSTEM) -# $(OBJCOPY) -O binary -R .note -R .comment -g -S $(SYSTEM) $@ +# $(OBJCOPY) $(OBJCOPYFLAGS) -g -S $(SYSTEM) $@ bzImage: zImage zImage: $(CONFIGURE) compressed/$(LINUX) - $(OBJCOPY) -O binary -R .note -R .comment -S compressed/$(LINUX) $@ + $(OBJCOPY) $(OBJCOPYFLAGS) -S compressed/$(LINUX) $@ bootpImage: bootp/bootp - $(OBJCOPY) -O binary -R .note -R .comment -S bootp/bootp $@ + $(OBJCOPY) $(OBJCOPYFLAGS) -S bootp/bootp $@ compressed/$(LINUX): $(LINUX) dep @$(MAKE) -C compressed $(LINUX)
arch/frv/include/asm/unistd.h +0 -1
@@ -30,7 +30,6 @@#define __ARCH_WANT_SYS_RT_SIGACTION#define __ARCH_WANT_SYS_RT_SIGSUSPEND#define __ARCH_WANT_SYS_EXECVE -#define __ARCH_WANT_KERNEL_EXECVE/* * "Conditional" syscalls
arch/frv/kernel/entry.S +3 -25
@@ -869,11 +869,6 @@ ret_from_kernel_thread: call schedule_tail calll.p @(gr21,gr0) or gr20,gr20,gr8 - bra sys_exit - - .globl ret_from_kernel_execve -ret_from_kernel_execve: - ori gr28,0,sp bra __syscall_exit ###################################################################################################
@@ -1080,27 +1075,10 @@ __entry_return_from_kernel_interrupt: subicc gr5,#0,gr0,icc0 beq icc0,#0,__entry_return_direct -__entry_preempt_need_resched: - ldi @(gr15,#TI_FLAGS),gr4 - andicc gr4,#_TIF_NEED_RESCHED,gr0,icc0 - beq icc0,#1,__entry_return_direct - - setlos #PREEMPT_ACTIVE,gr5 - sti gr5,@(gr15,#TI_FLAGS) - - andi gr23,#~PSR_PIL,gr23 - movgs gr23,psr - - call schedule - sti gr0,@(gr15,#TI_PRE_COUNT) - - movsg psr,gr23 - ori gr23,#PSR_PIL_14,gr23 - movgs gr23,psr - bra __entry_preempt_need_resched -#else - bra __entry_return_direct + subcc gr0,gr0,gr0,icc2 /* set Z and clear C */ + call preempt_schedule_irq #endif + bra __entry_return_direct ###############################################################################
arch/frv/kernel/process.c +3 -2
@@ -181,6 +181,9 @@ int copy_thread(unsigned long clone_flags, childregs = (struct pt_regs *) (task_stack_page (p) +THREAD_SIZE -FRV_FRAME0_SIZE ); +/* set up the userspace frame (the only place that the USP is stored) */ + *childregs = *__kernel_frame0_ptr; + p->set_child_tid = p->clear_child_tid =NULL ; p->thread.frame = childregs;
@@ -191,10 +194,8 @@ int copy_thread(unsigned long clone_flags, p->thread.frame0 = childregs;if (unlikely (!regs)) { -memset (childregs,0 ,sizeof (struct pt_regs )); childregs->gr9 = usp;/* function */ childregs->gr8 = arg; - childregs->psr =PSR_S ; p->thread.pc = (unsigned long ) ret_from_kernel_thread;save_user_regs (p->thread.user);return 0 ;
arch/frv/mb93090-mb00/pci-dma-nommu.c +1 -0
@@ -11,6 +11,7 @@#include <linux/types.h> #include <linux/slab.h> +#include <linux/export.h> #include <linux/dma-mapping.h> #include <linux/list.h> #include <linux/pci.h>
arch/h8300/include/asm/cache.h +2 -1
@@ -2,7 +2,8 @@#define __ARCH_H8300_CACHE_H/* bytes per L1 cache line */ -#define L1_CACHE_BYTES 4 +#define L1_CACHE_SHIFT 2 +#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)/* m68k-elf-gcc 2.95.2 doesn't like these */
arch/ia64/mm/init.c +0 -1
@@ -637,7 +637,6 @@ mem_init (void) high_memory =__va (max_low_pfn *PAGE_SIZE ); -reset_zone_present_pages ();for_each_online_pgdat (pgdat)if (pgdat->bdata->node_bootmem_map) totalram_pages +=free_all_bootmem_node (pgdat);
arch/m68k/include/asm/signal.h +3 -3
@@ -41,7 +41,7 @@ struct k_sigaction {static inline void sigaddset (sigset_t *set,int _sig) { asm ("bfset %0{%1,#1}" - :"+od" (*set) + :"+o" (*set) :"id" ((_sig -1 ) ^31 ) :"cc" ); }
@@ -49,7 +49,7 @@ static inline void sigaddset(sigset_t *set, int _sig)static inline void sigdelset (sigset_t *set,int _sig) { asm ("bfclr %0{%1,#1}" - :"+od" (*set) + :"+o" (*set) :"id" ((_sig -1 ) ^31 ) :"cc" ); }
@@ -65,7 +65,7 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)int ret; asm ("bfextu %1{%2,#1},%0" :"=d" (ret) - :"od" (*set),"id" ((_sig-1 ) ^31 ) + :"o" (*set),"id" ((_sig-1 ) ^31 ) :"cc" );return ret; }
arch/mips/cavium-octeon/executive/cvmx-l2c.c deleted +0 -900
900 lines not on this page · raw message
arch/unicore32/include/asm/byteorder.h deleted +0 -24
@@ -1,24 +0,0 @@ -/* -* linux/arch/unicore32/include/asm/byteorder.h -* -* Code specific to PKUnity SoC and UniCore ISA -* -* Copyright (C) 2001-2010 GUAN Xue-tao -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* UniCore ONLY support Little Endian mode, the data bus is connected such -* that byte accesses appear as: -* 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31 -* and word accesses (data or instruction) appear as: -* d0...d31 -*/ -#ifndef __UNICORE_BYTEORDER_H__ -#define __UNICORE_BYTEORDER_H__ - -#include <linux/byteorder/little_endian.h> - -#endif -
arch/unicore32/include/asm/kvm_para.h deleted +0 -1
@@ -1 +0,0 @@ -#include <asm-generic/kvm_para.h>
arch/unicore32/include/asm/sigcontext.h deleted +0 -29
@@ -1,29 +0,0 @@ -/* -* linux/arch/unicore32/include/asm/sigcontext.h -* -* Code specific to PKUnity SoC and UniCore ISA -* -* Copyright (C) 2001-2010 GUAN Xue-tao -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ -#ifndef __UNICORE_SIGCONTEXT_H__ -#define __UNICORE_SIGCONTEXT_H__ - -#include <asm/ptrace.h> -/* -* Signal context structure - contains all info to do with the state -* before the signal handler was invoked. Note: only add new entries -* to the end of the structure. -*/ -struct sigcontext { -unsigned long trap_no; -unsigned long error_code; -unsigned long oldmask; -unsigned long fault_address; -struct pt_regs regs; -}; - -#endif
arch/unicore32/include/asm/unistd.h deleted +0 -14
@@ -1,14 +0,0 @@ -/* -* linux/arch/unicore32/include/asm/unistd.h -* -* Code specific to PKUnity SoC and UniCore ISA -* -* Copyright (C) 2001-2010 GUAN Xue-tao -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -/* Use the standard ABI for syscalls. */ -#include <asm-generic/unistd.h>
arch/x86/kvm/x86.c +6 -0
@@ -5938,6 +5938,12 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,return 0 ; } +int kvm_arch_vcpu_ioctl_set_entitlement (struct kvm_vcpu *vcpu,long entitlement) +{ + vcpu->arch.consigned_limit = entitlement; +return 0 ; +} +int kvm_arch_vcpu_ioctl_get_fpu (struct kvm_vcpu *vcpu,struct kvm_fpu *fpu) { struct i387_fxsave_struct *fxsave =
include/linux/kvm_host.h +2 -0
@@ -590,6 +590,8 @@ void kvm_arch_hardware_unsetup(void);void kvm_arch_check_processor_compat (void *rtn);int kvm_arch_vcpu_runnable (struct kvm_vcpu *vcpu);int kvm_arch_vcpu_should_kick (struct kvm_vcpu *vcpu); +int kvm_arch_vcpu_ioctl_set_entitlement (struct kvm_vcpu *vcpu, +long entitlement);void kvm_free_physmem (struct kvm *kvm);
include/linux/raid/md_p.h deleted +0 -301
301 lines not on this page · raw message
include/uapi/linux/kvm.h +2 -0
@@ -921,6 +921,8 @@ struct kvm_s390_ucas_mapping {#define KVM_SET_ONE_REG _IOW(KVMIO, 0xac, struct kvm_one_reg)/* VM is being stopped by host */ #define KVM_KVMCLOCK_CTRL _IO(KVMIO, 0xad) +/* Set the consignment limit which will be used to separete steal time */ +#define KVM_SET_ENTITLEMENT _IOW(KVMIO, 0xae, unsigned long)#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)
tools/perf/builtin-test.c deleted +0 -1559
254 lines not on this page · raw message
tools/perf/util/dso-test-data.c deleted +0 -153
153 lines not on this page · raw message
tools/perf/util/parse-events-test.c deleted +0 -1116
1,116 lines not on this page · raw message
tools/testing/selftests/epoll/Makefile deleted +0 -11
Lines of this file are not shown. View the raw message.
tools/testing/selftests/epoll/test_epoll.c deleted +0 -344
344 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Re: [PATCH 5/5] Add an ioctl to communicate the consign limit to the host.
Quoted 3 lines · Michael Wolf
Add an ioctl to communicate the consign limit to the host.
Signed-off-by Michael Wolf <[email protected]>
Something is very wrong with this patch.
virt/kvm/kvm_main.c
Quoted 6,502 lines
--- CREDITS | 5 Documentation/arm64/memory.txt | 12 Documentation/cgroups/memory.txt | 4 .../devicetree/bindings/net/mdio-gpio.txt | 9 Documentation/filesystems/proc.txt | 16 Documentation/hwmon/fam15h_power | 2 Documentation/kernel-parameters.txt | 20 Documentation/networking/netdev-features.txt | 2 Documentation/scheduler/numa-problem.txt | 20 MAINTAINERS | 87 + Makefile | 2 arch/alpha/kernel/osf_sys.c | 6 arch/arm/boot/Makefile | 10 arch/arm/boot/dts/tegra30.dtsi | 4 arch/arm/include/asm/io.h | 4 arch/arm/include/asm/sched_clock.h | 2 arch/arm/include/asm/vfpmacros.h | 12 arch/arm/include/uapi/asm/hwcap.h | 3 arch/arm/kernel/sched_clock.c | 18 arch/arm/mach-at91/at91rm9200_devices.c | 2 arch/arm/mach-at91/at91sam9260_devices.c | 2 arch/arm/mach-at91/at91sam9261_devices.c | 2 arch/arm/mach-at91/at91sam9263_devices.c | 2 arch/arm/mach-at91/at91sam9g45_devices.c | 12 arch/arm/mach-davinci/dm644x.c | 3 arch/arm/mach-highbank/system.c | 3 arch/arm/mach-imx/clk-gate2.c | 2 arch/arm/mach-imx/ehci-imx25.c | 2 arch/arm/mach-imx/ehci-imx35.c | 2 arch/arm/mach-omap2/board-igep0020.c | 5 arch/arm/mach-omap2/clockdomains44xx_data.c | 2 arch/arm/mach-omap2/devices.c | 79 + arch/arm/mach-omap2/omap_hwmod.c | 63 + arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 36 arch/arm/mach-omap2/twl-common.c | 3 arch/arm/mach-omap2/vc.c | 2 arch/arm/mach-pxa/hx4700.c | 8 arch/arm/mach-pxa/spitz_pm.c | 8 arch/arm/mm/alignment.c | 2 arch/arm/plat-omap/include/plat/omap_hwmod.h | 6 arch/arm/tools/Makefile | 2 arch/arm/vfp/vfpmodule.c | 9 arch/arm/xen/enlighten.c | 11 arch/arm/xen/hypercall.S | 14 arch/arm64/Kconfig | 1 arch/arm64/include/asm/elf.h | 5 arch/arm64/include/asm/fpsimd.h | 5 arch/arm64/include/asm/io.h | 10 arch/arm64/include/asm/pgtable-hwdef.h | 6 arch/arm64/include/asm/pgtable.h | 40 - arch/arm64/include/asm/processor.h | 2 arch/arm64/include/asm/unistd.h | 1 arch/arm64/kernel/perf_event.c | 10 arch/arm64/kernel/process.c | 18 arch/arm64/kernel/smp.c | 3 arch/arm64/mm/init.c | 2 arch/frv/Kconfig | 1 arch/frv/boot/Makefile | 10 arch/frv/include/asm/unistd.h | 1 arch/frv/kernel/entry.S | 28 arch/frv/kernel/process.c | 5 arch/frv/mb93090-mb00/pci-dma-nommu.c | 1 arch/h8300/include/asm/cache.h | 3 arch/ia64/mm/init.c | 1 arch/m68k/include/asm/signal.h | 6 arch/mips/cavium-octeon/executive/cvmx-l2c.c | 900 ------------ arch/unicore32/include/asm/byteorder.h | 24 arch/unicore32/include/asm/kvm_para.h | 1 arch/unicore32/include/asm/sigcontext.h | 29 arch/unicore32/include/asm/unistd.h | 14 arch/x86/kvm/x86.c | 6 include/linux/kvm_host.h | 2 include/linux/raid/md_p.h | 301 ---- include/uapi/linux/kvm.h | 2 tools/perf/builtin-test.c | 1559 -------------------- tools/perf/util/dso-test-data.c | 153 -- tools/perf/util/parse-events-test.c | 1116 -------------- tools/testing/selftests/epoll/Makefile | 11 tools/testing/selftests/epoll/test_epoll.c | 344 ---- virt/kvm/kvm_main.c | 7 80 files changed, 471 insertions(+), 4677 deletions(-) delete mode 100644 arch/mips/cavium-octeon/executive/cvmx-l2c.c delete mode 100644 arch/unicore32/include/asm/byteorder.h delete mode 100644 arch/unicore32/include/asm/kvm_para.h delete mode 100644 arch/unicore32/include/asm/sigcontext.h delete mode 100644 arch/unicore32/include/asm/unistd.h delete mode 100644 include/linux/raid/md_p.h delete mode 100644 tools/perf/builtin-test.c delete mode 100644 tools/perf/util/dso-test-data.c delete mode 100644 tools/perf/util/parse-events-test.c delete mode 100644 tools/testing/selftests/epoll/Makefile delete mode 100644 tools/testing/selftests/epoll/test_epoll.cCREDITS +5
-0@@ -1824,6 +1824,11 @@ S: Kattreinstr 38 S: D-64295 S: Germany +N: Avi Kivity +E: [email protected] +D: Kernel-based Virtual Machine (KVM) +S: Ra'annana, Israel + N: Andi Kleen E: [email protected] U: http://www.halobates.deDocumentation/arm64/memory.txt +6
-6@@ -27,17 +27,17 @@ Start End Size Use ----------------------------------------------------------------------- 0000000000000000 0000007fffffffff 512GB user -ffffff8000000000 ffffffbbfffcffff ~240GB vmalloc +ffffff8000000000 ffffffbbfffeffff ~240GB vmalloc -ffffffbbfffd0000 ffffffbcfffdffff 64KB [guard page] +ffffffbbffff0000 ffffffbbffffffff 64KB [guard page] -ffffffbbfffe0000 ffffffbcfffeffff 64KB PCI I/O space +ffffffbc00000000 ffffffbdffffffff 8GB vmemmap -ffffffbbffff0000 ffffffbcffffffff 64KB [guard page] +ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap] -ffffffbc00000000 ffffffbdffffffff 8GB vmemmap +ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space -ffffffbe00000000 ffffffbffbffffff ~8GB [guard, future vmmemap] +ffffffbbffff0000 ffffffbcffffffff ~2MB [guard] ffffffbffc000000 ffffffbfffffffff 64MB modulesDocumentation/cgroups/memory.txt +4
-0@@ -466,6 +466,10 @@ Note: 5.3 swappiness Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. +Please note that unlike the global swappiness, memcg knob set to 0 +really prevents from any swapping even if there is a swap storage +available. This might lead to memcg OOM killer if there are no file +pages to reclaim. Following cgroups' swappiness can't be changed. - root cgroup (uses /proc/sys/vm/swappiness).Documentation/devicetree/bindings/net/mdio-gpio.txt +8
-1@@ -8,9 +8,16 @@ gpios property as described in section VIII.1 in the following order: MDC, MDIO. +Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases" +node. + Example: -mdio { +aliases { + mdio-gpio0 = <&mdio0>; +}; + +mdio0: mdio { compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>;Documentation/filesystems/proc.txt +12
-4@@ -33,7 +33,7 @@ Table of Contents 2 Modifying System Parameters 3 Per-Process Parameters - 3.1 /proc/<pid>/oom_score_adj - Adjust the oom-killer + 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj - Adjust the oom-killer score 3.2 /proc/<pid>/oom_score - Display current oom-killer score 3.3 /proc/<pid>/io - Display the IO accounting fields@@ -1320,10 +1320,10 @@ of the kernel. CHAPTER 3: PER-PROCESS PARAMETERS ------------------------------------------------------------------------------ -3.1 /proc/<pid>/oom_score_adj- Adjust the oom-killer score +3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score -------------------------------------------------------------------------------- -This file can be used to adjust the badness heuristic used to select which +These file can be used to adjust the badness heuristic used to select which process gets killed in out of memory conditions. The badness heuristic assigns a value to each candidate task ranging from 0@@ -1361,6 +1361,12 @@ same system, cpuset, mempolicy, or memory controller resources to use at least equivalent to discounting 50% of the task's allowed memory from being considered as scoring against the task. +For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also +be used to tune the badness score. Its acceptable values range from -16 +(OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17 +(OOM_DISABLE) to disable oom killing entirely for that task. Its value is +scaled linearly with /proc/<pid>/oom_score_adj. + The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last value set by a CAP_SYS_RESOURCE process. To reduce the value any lower requires CAP_SYS_RESOURCE.@@ -1375,7 +1381,9 @@ minimal amount of work. ------------------------------------------------------------- This file can be used to check the current score used by the oom-killer is for -any given <pid>. +any given <pid>. Use it together with /proc/<pid>/oom_score_adj to tune which +process should be killed in an out-of-memory situation. + 3.3 /proc/<pid>/io - Display the IO accounting fields -------------------------------------------------------Documentation/hwmon/fam15h_power +1
-1@@ -10,7 +10,7 @@ Supported chips: BIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processors (not yet published) -Author: Andreas Herrmann <[email protected]> +Author: Andreas Herrmann <[email protected]> Description -----------Documentation/kernel-parameters.txt +20
-0@@ -1304,6 +1304,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. lapic [X86-32,APIC] Enable the local APIC even if BIOS disabled it. + lapic= [x86,APIC] "notscdeadline" Do not use TSC deadline + value for LAPIC timer one-shot implementation. Default + back to the programmable timer unit in the LAPIC. + lapic_timer_c2_ok [X86,APIC] trust the local apic timer in C2 power state.@@ -2859,6 +2863,22 @@ bytes respectively. Such letter suffixes can also be entirely omitted. to facilitate early boot debugging. See also Documentation/trace/events.txt + trace_options=[option-list] + [FTRACE] Enable or disable tracer options at boot. + The option-list is a comma delimited list of options + that can be enabled or disabled just as if you were + to echo the option name into + + /sys/kernel/debug/tracing/trace_options + + For example, to enable stacktrace option (to dump the + stack trace of each event), add to the command line: + + trace_options=stacktrace + + See also Documentation/trace/ftrace.txt "trace options" + section. + transparent_hugepage= [KNL] Format: [always|madvise|never]Documentation/networking/netdev-features.txt +1
-1@@ -164,4 +164,4 @@ read the CRC recorded by the NIC on receipt of the packet. This requests that the NIC receive all possible frames, including errored frames (such as bad FCS, etc). This can be helpful when sniffing a link with bad packets on it. Some NICs may receive more packets if also put into normal -PROMISC mdoe. +PROMISC mode.Documentation/scheduler/numa-problem.txt +13
-7@@ -133,6 +133,8 @@ XXX properties of this M vs a potential optimal 2b) migrate memory towards 'n_i' using 2 samples. +XXX include the statistical babble on double sampling somewhere near + This separates pages into those that will migrate and those that will not due to the two samples not matching. We could consider the first to be of 'p_i' (private) and the second to be of 's_i' (shared).@@ -142,7 +144,17 @@ This interpretation can be motivated by the previously observed property that 's_i' (shared). (here we loose the need for memory limits again, since it becomes indistinguishable from shared). -XXX include the statistical babble on double sampling somewhere near + 2c) use cpu samples instead of node samples + +The problem with sampling on node granularity is that one looses 's_i' for +the local node, since one cannot distinguish between two accesses from the +same node. + +By increasing the granularity to per-cpu we gain the ability to have both an +'s_i' and 'p_i' per node. Since we do all task placement per-cpu as well this +seems like a natural match. The line where we overcommit cpus is where we loose +granularity again, but when we loose overcommit we naturally spread tasks. +Therefore it should work out nicely. This reduces the problem further; we loose 'M' as per 2a, it further reduces the 'T_k,l' (interconnect traffic) term to only include shared (since per the@@ -150,12 +162,6 @@ above all private will be local): T_k,l = \Sum_i bs_i,l for every n_i = k, l != k -[ more or less matches the state of sched/numa and describes its remaining - problems and assumptions. It should work well for tasks without significant - shared memory usage between tasks. ] - -Possible future directions: - Motivated by the form of 'T_k,l', try and obtain each term of the sum, so we can evaluate it;MAINTAINERS +73
-14@@ -503,7 +503,7 @@ F: include/linux/altera_uart.h F: include/linux/altera_jtaguart.h AMD FAM15H PROCESSOR POWER MONITORING DRIVER -M: Andreas Herrmann <[email protected]> +M: Andreas Herrmann <[email protected]> L: [email protected] S: Maintained F: Documentation/hwmon/fam15h_power@@ -526,10 +526,10 @@ F: drivers/video/geode/ F: arch/x86/include/asm/geode.h AMD IOMMU (AMD-VI) -M: Joerg Roedel <[email protected]> +M: Joerg Roedel <[email protected]> L: [email protected] T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git -S: Supported +S: Maintained F: drivers/iommu/amd_iommu*.[ch] F: include/linux/amd-iommu.h@@ -841,6 +841,14 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kristoffer/linux-hpc.git F: arch/arm/mach-sa1100/jornada720.c F: arch/arm/mach-sa1100/include/mach/jornada720.h +ARM/IGEP MACHINE SUPPORT +M: Enric Balletbo i Serra <[email protected]> +M: Javier Martinez Canillas <[email protected]> +L: [email protected] +L: [email protected] (moderated for non-subscribers) +S: Maintained +F: arch/arm/mach-omap2/board-igep0020.c + ARM/INCOME PXA270 SUPPORT M: Marek Vasut <[email protected]> L: [email protected] (moderated for non-subscribers)@@ -2507,6 +2515,7 @@ M: Joonyoung Shim <[email protected]> M: Seung-Woo Kim <[email protected]> M: Kyungmin Park <[email protected]> L: [email protected] +T: git git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git S: Supported F: drivers/gpu/drm/exynos F: include/drm/exynos*@@ -3597,6 +3606,49 @@ F: drivers/hid/hid-hyperv.c F: drivers/net/hyperv/ F: drivers/staging/hv/ +I2C OVER PARALLEL PORT +M: Jean Delvare <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/i2c/busses/i2c-parport +F: Documentation/i2c/busses/i2c-parport-light +F: drivers/i2c/busses/i2c-parport.c +F: drivers/i2c/busses/i2c-parport-light.c + +I2C/SMBUS CONTROLLER DRIVERS FOR PC +M: Jean Delvare <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/i2c/busses/i2c-ali1535 +F: Documentation/i2c/busses/i2c-ali1563 +F: Documentation/i2c/busses/i2c-ali15x3 +F: Documentation/i2c/busses/i2c-amd756 +F: Documentation/i2c/busses/i2c-amd8111 +F: Documentation/i2c/busses/i2c-i801 +F: Documentation/i2c/busses/i2c-nforce2 +F: Documentation/i2c/busses/i2c-piix4 +F: Documentation/i2c/busses/i2c-sis5595 +F: Documentation/i2c/busses/i2c-sis630 +F: Documentation/i2c/busses/i2c-sis96x +F: Documentation/i2c/busses/i2c-via +F: Documentation/i2c/busses/i2c-viapro +F: drivers/i2c/busses/i2c-ali1535.c +F: drivers/i2c/busses/i2c-ali1563.c +F: drivers/i2c/busses/i2c-ali15x3.c +F: drivers/i2c/busses/i2c-amd756.c +F: drivers/i2c/busses/i2c-amd756-s4882.c +F: drivers/i2c/busses/i2c-amd8111.c +F: drivers/i2c/busses/i2c-i801.c +F: drivers/i2c/busses/i2c-isch.c +F: drivers/i2c/busses/i2c-nforce2.c +F: drivers/i2c/busses/i2c-nforce2-s4985.c +F: drivers/i2c/busses/i2c-piix4.c +F: drivers/i2c/busses/i2c-sis5595.c +F: drivers/i2c/busses/i2c-sis630.c +F: drivers/i2c/busses/i2c-sis96x.c +F: drivers/i2c/busses/i2c-via.c +F: drivers/i2c/busses/i2c-viapro.c + I2C/SMBUS STUB DRIVER M: "Mark M. Hoffman" <[email protected]> L: [email protected]@@ -3604,9 +3656,8 @@ S: Maintained F: drivers/i2c/busses/i2c-stub.c I2C SUBSYSTEM -M: "Jean Delvare (PC drivers, core)" <[email protected]> +M: Wolfram Sang <[email protected]> M: "Ben Dooks (embedded platforms)" <[email protected]> -M: "Wolfram Sang (embedded platforms)" <[email protected]> L: [email protected] W: http://i2c.wiki.kernel.org/ T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/@@ -3617,6 +3668,13 @@ F: drivers/i2c/ F: include/linux/i2c.h F: include/linux/i2c-*.h +I2C-TAOS-EVM DRIVER +M: Jean Delvare <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/i2c/busses/i2c-taos-evm +F: drivers/i2c/busses/i2c-taos-evm.c + I2C-TINY-USB DRIVER M: Till Harbaum <[email protected]> L: [email protected]@@ -4230,8 +4288,8 @@ F: include/linux/lockd/ F: include/linux/sunrpc/ KERNEL VIRTUAL MACHINE (KVM) -M: Avi Kivity <[email protected]> M: Marcelo Tosatti <[email protected]> +M: Gleb Natapov <[email protected]> L: [email protected] W: http://kvm.qumranet.com S: Supported@@ -5655,7 +5713,7 @@ S: Maintained F: drivers/pinctrl/spear/ PKTCDVD DRIVER -M: Peter Osterlund <[email protected]> +M: Jiri Kosina <[email protected]> S: Maintained F: drivers/block/pktcdvd.c F: include/linux/pktcdvd.h@@ -7217,6 +7275,14 @@ L: [email protected] S: Maintained F: arch/xtensa/ +THERMAL +M: Zhang Rui <[email protected]> +L: [email protected] +T: git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git +S: Supported +F: drivers/thermal/ +F: include/linux/thermal.h + THINKPAD ACPI EXTRAS DRIVER M: Henrique de Moraes Holschuh <[email protected]> L: [email protected]@@ -7894,13 +7960,6 @@ M: Roger Luethi <[email protected]> S: Maintained F: drivers/net/ethernet/via/via-rhine.c -VIAPRO SMBUS DRIVER -M: Jean Delvare <[email protected]> -L: [email protected] -S: Maintained -F: Documentation/i2c/busses/i2c-viapro -F: drivers/i2c/busses/i2c-viapro.c - VIA SD/MMC CARD CONTROLLER DRIVER M: Bruce Chang <[email protected]> M: Harald Welte <[email protected]>Makefile +1
-1@@ -1,7 +1,7 @@ VERSION = 3 PATCHLEVEL = 7 SUBLEVEL = 0 -EXTRAVERSION = -rc3 +EXTRAVERSION = -rc6 NAME = Terrified Chipmunk # *DOCUMENTATION*arch/alpha/kernel/osf_sys.c +3
-3@@ -445,7 +445,7 @@ struct procfs_args {* unhappy with OSF UFS. [CHECKME] */ static int -osf_ufs_mount (char *dirname,struct ufs_args __user *args,int flags) +osf_ufs_mount (const char *dirname,struct ufs_args __user *args,int flags) {int retval;struct cdfs_args tmp;@@ -465,7 +465,7 @@ osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags) }static int -osf_cdfs_mount (char *dirname,struct cdfs_args __user *args,int flags) +osf_cdfs_mount (const char *dirname,struct cdfs_args __user *args,int flags) {int retval;struct cdfs_args tmp;@@ -485,7 +485,7 @@ osf_cdfs_mount(char *dirname, struct cdfs_args __user *args, int flags) }static int -osf_procfs_mount (char *dirname,struct procfs_args __user *args,int flags) +osf_procfs_mount (const char *dirname,struct procfs_args __user *args,int flags) {struct procfs_args tmp;arch/arm/boot/Makefile +5
-5@@ -33,7 +33,7 @@ ifeq ($(CONFIG_XIP_KERNEL),y) $(obj)/xipImage: vmlinux FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' + @$(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' $(obj)/Image $(obj)/zImage: FORCE @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)'@@ -48,14 +48,14 @@ $(obj)/xipImage: FORCE $(obj)/Image: vmlinux FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready' + @$(kecho) ' Kernel: $@ is ready' $(obj)/compressed/vmlinux: $(obj)/Image FORCE $(Q)$(MAKE) $(build)=$(obj)/compressed $@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready' + @$(kecho) ' Kernel: $@ is ready' endif@@ -90,7 +90,7 @@ fi $(obj)/uImage: $(obj)/zImage FORCE @$(check_for_multiple_loadaddr) $(call if_changed,uimage) - $(kecho) ' Image $@ is ready' + @$(kecho) ' Image $@ is ready' $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE $(Q)$(MAKE) $(build)=$(obj)/bootp $@@@ -98,7 +98,7 @@ $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE $(obj)/bootpImage: $(obj)/bootp/bootp FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready' + @$(kecho) ' Kernel: $@ is ready' PHONY += initrd FORCE initrd:arch/arm/boot/dts/tegra30.dtsi +2
-2@@ -73,8 +73,8 @@ pinmux: pinmux { compatible = "nvidia,tegra30-pinmux"; - reg = <0x70000868 0xd0 /* Pad control registers */ - 0x70003000 0x3e0>; /* Mux registers */ + reg = <0x70000868 0xd4 /* Pad control registers */ + 0x70003000 0x3e4>; /* Mux registers */ }; serial@70006000 {arch/arm/include/asm/io.h +2
-2@@ -64,7 +64,7 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);static inline void __raw_writew (u16 val,volatile void __iomem *addr) { asmvolatile ("strh %1, %0" - :"+Qo" (*(volatile u16 __force *)addr) + :"+Q" (*(volatile u16 __force *)addr) :"r" (val)); }@@ -72,7 +72,7 @@ static inline u16 __raw_readw(const volatile void __iomem *addr) {u16 val; asmvolatile ("ldrh %1, %0" - :"+Qo" (*(volatile u16 __force *)addr), + :"+Q" (*(volatile u16 __force *)addr),"=r" (val));return val; }arch/arm/include/asm/sched_clock.h +0
-2@@ -10,7 +10,5 @@extern void sched_clock_postinit (void );extern void setup_sched_clock (u32 (*read)(void ),int bits,unsigned long rate); -extern void setup_sched_clock_needs_suspend (u32 (*read)(void ),int bits, -unsigned long rate);#endif arch/arm/include/asm/vfpmacros.h +6
-6@@ -27,9 +27,9 @@#if __LINUX_ARM_ARCH__ <=6 ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] - tst \tmp, #HWCAP_VFPv3D16 - ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} - addne \base, \base, #32*4 @ step over unused register space + tst \tmp, #HWCAP_VFPD32 + ldcnel p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} + addeq \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field@@ -51,9 +51,9 @@#if __LINUX_ARM_ARCH__ <=6 ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] - tst \tmp, #HWCAP_VFPv3D16 - stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} - addne \base, \base, #32*4 @ step over unused register space + tst \tmp, #HWCAP_VFPD32 + stcnel p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} + addeq \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD fieldarch/arm/include/uapi/asm/hwcap.h +2
-1@@ -18,11 +18,12 @@#define HWCAP_THUMBEE (1 << 11)#define HWCAP_NEON (1 << 12)#define HWCAP_VFPv3 (1 << 13) -#define HWCAP_VFPv3D16 (1 << 14) +#define HWCAP_VFPv3D16 (1 << 14)/* also set for VFPv4-D16 */ #define HWCAP_TLS (1 << 15)#define HWCAP_VFPv4 (1 << 16)#define HWCAP_IDIVA (1 << 17)#define HWCAP_IDIVT (1 << 18) +#define HWCAP_VFPD32 (1 << 19)/* set if VFP has 32 regs (not 16) */ #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)arch/arm/kernel/sched_clock.c +4
-14@@ -107,13 +107,6 @@ static void sched_clock_poll(unsigned long wrap_ticks)update_sched_clock (); } -void __init setup_sched_clock_needs_suspend (u32 (*read)(void ),int bits, -unsigned long rate) -{ -setup_sched_clock (read, bits, rate); - cd.needs_suspend = true; -} -void __init setup_sched_clock (u32 (*read)(void ),int bits,unsigned long rate) {unsigned long r, w;@@ -189,18 +182,15 @@ void __init sched_clock_postinit(void)static int sched_clock_suspend (void ) {sched_clock_poll (sched_clock_timer.data); -if (cd.needs_suspend) - cd.suspended = true; + cd.suspended = true;return 0 ; }static void sched_clock_resume (void ) { -if (cd.needs_suspend) { - cd.epoch_cyc =read_sched_clock (); - cd.epoch_cyc_copy = cd.epoch_cyc; - cd.suspended = false; - } + cd.epoch_cyc =read_sched_clock (); + cd.epoch_cyc_copy = cd.epoch_cyc; + cd.suspended = false; }static struct syscore_ops sched_clock_ops = {arch/arm/mach-at91/at91rm9200_devices.c +1
-1@@ -68,7 +68,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }arch/arm/mach-at91/at91sam9260_devices.c +1
-1@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }arch/arm/mach-at91/at91sam9261_devices.c +1
-1@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }arch/arm/mach-at91/at91sam9263_devices.c +1
-1@@ -78,7 +78,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }arch/arm/mach-at91/at91sam9g45_devices.c +6
-6@@ -1841,8 +1841,8 @@ static struct resource sha_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };@@ -1874,8 +1874,8 @@ static struct resource tdes_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };@@ -1910,8 +1910,8 @@ static struct resource aes_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };arch/arm/mach-davinci/dm644x.c +1
-2@@ -713,8 +713,7 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,break ;case VPBE_ENC_CUSTOM_TIMINGS :if (pclock <=27000000 ) { - v |=DM644X_VPSS_MUXSEL_PLL2_MODE | -DM644X_VPSS_DACCLKEN ; + v |=DM644X_VPSS_DACCLKEN ;writel (v,DAVINCI_SYSMOD_VIRT (SYSMOD_VPSS_CLKCTL )); }else {/* arch/arm/mach-highbank/system.c +2
-1@@ -28,6 +28,7 @@ void highbank_restart(char mode, const char *cmd)hignbank_set_pwr_soft_reset ();scu_power_mode (scu_base_addr,SCU_PM_POWEROFF ); -cpu_do_idle (); +while (1 ) +cpu_do_idle (); }arch/arm/mach-imx/clk-gate2.c +1
-1@@ -112,7 +112,7 @@ struct clk *clk_register_gate2(struct device *dev, const char *name, clk =clk_register (dev, &gate->hw);if (IS_ERR (clk)) -kfree (clk); +kfree (gate);return clk; }arch/arm/mach-imx/ehci-imx25.c +1
-1@@ -30,7 +30,7 @@#define MX25_H1_SIC_SHIFT 21#define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT)#define MX25_H1_PP_BIT (1 << 18) -#define MX25_H1_PM_BIT (1 << 8) +#define MX25_H1_PM_BIT (1 << 16)#define MX25_H1_IPPUE_UP_BIT (1 << 7)#define MX25_H1_IPPUE_DOWN_BIT (1 << 6)#define MX25_H1_TLL_BIT (1 << 5)arch/arm/mach-imx/ehci-imx35.c +1
-1@@ -30,7 +30,7 @@#define MX35_H1_SIC_SHIFT 21#define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT)#define MX35_H1_PP_BIT (1 << 18) -#define MX35_H1_PM_BIT (1 << 8) +#define MX35_H1_PM_BIT (1 << 16)#define MX35_H1_IPPUE_UP_BIT (1 << 7)#define MX35_H1_IPPUE_DOWN_BIT (1 << 6)#define MX35_H1_TLL_BIT (1 << 5)arch/arm/mach-omap2/board-igep0020.c +5
-0@@ -580,6 +580,11 @@ static void __init igep_wlan_bt_init(void) }else return ; +/* Make sure that the GPIO pins are muxed correctly */ +omap_mux_init_gpio (igep_wlan_bt_gpios[0 ].gpio,OMAP_PIN_OUTPUT ); +omap_mux_init_gpio (igep_wlan_bt_gpios[1 ].gpio,OMAP_PIN_OUTPUT ); +omap_mux_init_gpio (igep_wlan_bt_gpios[2 ].gpio,OMAP_PIN_OUTPUT ); + err =gpio_request_array (igep_wlan_bt_gpios,ARRAY_SIZE (igep_wlan_bt_gpios));if (err) {arch/arm/mach-omap2/clockdomains44xx_data.c +1
-1@@ -359,7 +359,7 @@ static struct clockdomain iss_44xx_clkdm = { .clkdm_offs = OMAP4430_CM2_CAM_CAM_CDOFFS, .wkdep_srcs = iss_wkup_sleep_deps, .sleepdep_srcs = iss_wkup_sleep_deps, - .flags = CLKDM_CAN_HWSUP_SWSUP, + .flags = CLKDM_CAN_SWSUP, };static struct clockdomain l3_dss_44xx_clkdm = {arch/arm/mach-omap2/devices.c +79
-0@@ -19,6 +19,7 @@#include <linux/of.h> #include <linux/pinctrl/machine.h> #include <linux/platform_data/omap4-keypad.h> +#include <linux/platform_data/omap_ocp2scp.h> #include <asm/mach-types.h> #include <asm/mach/map.h> @@ -613,6 +614,83 @@ static void omap_init_vout(void)static inline void omap_init_vout (void ) {}#endif +#if defined(CONFIG_OMAP_OCP2SCP ) || defined(CONFIG_OMAP_OCP2SCP_MODULE ) +static int count_ocp2scp_devices (struct omap_ocp2scp_dev *ocp2scp_dev) +{ +int cnt =0 ; + +while (ocp2scp_dev->drv_name !=NULL ) { + cnt++; + ocp2scp_dev++; + } + +return cnt; +} + +static void omap_init_ocp2scp (void ) +{ +struct omap_hwmod *oh; +struct platform_device *pdev; +int bus_id =-1 , dev_cnt =0 , i; +struct omap_ocp2scp_dev *ocp2scp_dev; +const char *oh_name, *name; +struct omap_ocp2scp_platform_data *pdata; + +if (!cpu_is_omap44xx ()) +return ; + + oh_name ="ocp2scp_usb_phy" ; + name ="omap-ocp2scp" ; + + oh =omap_hwmod_lookup (oh_name); +if (!oh) { +pr_err ("%s: could not find omap_hwmod for %s\n" , __func__, + oh_name); +return ; + } + + pdata =kzalloc (sizeof (*pdata),GFP_KERNEL ); +if (!pdata) { +pr_err ("%s: No memory for ocp2scp pdata\n" , __func__); +return ; + } + + ocp2scp_dev = oh->dev_attr; + dev_cnt =count_ocp2scp_devices (ocp2scp_dev); + +if (!dev_cnt) { +pr_err ("%s: No devices connected to ocp2scp\n" , __func__); +kfree (pdata); +return ; + } + + pdata->devices =kzalloc (sizeof (struct omap_ocp2scp_dev *) + * dev_cnt,GFP_KERNEL ); +if (!pdata->devices) { +pr_err ("%s: No memory for ocp2scp pdata devices\n" , __func__); +kfree (pdata); +return ; + } + +for (i =0 ; i < dev_cnt; i++, ocp2scp_dev++) + pdata->devices[i] = ocp2scp_dev; + + pdata->dev_cnt = dev_cnt; + + pdev =omap_device_build (name, bus_id, oh, pdata,sizeof (*pdata),NULL , +0 , false); +if (IS_ERR (pdev)) { +pr_err ("Could not build omap_device for %s %s\n" , + name, oh_name); +kfree (pdata->devices); +kfree (pdata); +return ; + } +} +#else +static inline void omap_init_ocp2scp (void ) { } +#endif +/*-------------------------------------------------------------------------*/ static int __init omap2_init_devices (void )@@ -640,6 +718,7 @@ static int __init omap2_init_devices(void)omap_init_sham ();omap_init_aes ();omap_init_vout (); +omap_init_ocp2scp ();return 0 ; }arch/arm/mach-omap2/omap_hwmod.c +49
-14@@ -422,6 +422,38 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v) }/** +* _wait_softreset_complete - wait for an OCP softreset to complete +* @oh: struct omap_hwmod * to wait on +* +* Wait until the IP block represented by @oh reports that its OCP +* softreset is complete. This can be triggered by software (see +* _ocp_softreset()) or by hardware upon returning from off-mode (one +* example is HSMMC). Waits for up to MAX_MODULE_SOFTRESET_WAIT +* microseconds. Returns the number of microseconds waited. +*/ +static int _wait_softreset_complete (struct omap_hwmod *oh) +{ +struct omap_hwmod_class_sysconfig *sysc; +u32 softrst_mask; +int c =0 ; + + sysc = oh->class->sysc; + +if (sysc->sysc_flags &SYSS_HAS_RESET_STATUS ) +omap_test_timeout ((omap_hwmod_read (oh, sysc->syss_offs) + &SYSS_RESETDONE_MASK ), +MAX_MODULE_SOFTRESET_WAIT , c); +else if (sysc->sysc_flags &SYSC_HAS_RESET_STATUS ) { + softrst_mask = (0x1 << sysc->sysc_fields->srst_shift); +omap_test_timeout (!(omap_hwmod_read (oh, sysc->sysc_offs) + & softrst_mask), +MAX_MODULE_SOFTRESET_WAIT , c); + } + +return c; +} + +/** * _set_dmadisable: set OCP_SYSCONFIG.DMADISABLE bit in @v * @oh: struct omap_hwmod * * @@ -1282,6 +1314,18 @@ static void _enable_sysc(struct omap_hwmod *oh)if (!oh->class->sysc)return ; +/* +* Wait until reset has completed, this is needed as the IP +* block is reset automatically by hardware in some cases +* (off-mode for example), and the drivers require the +* IP to be ready when they access it +*/ +if (oh->flags &HWMOD_CONTROL_OPT_CLKS_IN_RESET ) +_enable_optional_clocks (oh); +_wait_softreset_complete (oh); +if (oh->flags &HWMOD_CONTROL_OPT_CLKS_IN_RESET ) +_disable_optional_clocks (oh); + v = oh->_sysc_cache; sf = oh->class->sysc->sysc_flags;@@ -1804,7 +1848,7 @@ static int _am33xx_disable_module(struct omap_hwmod *oh)*/ static int _ocp_softreset (struct omap_hwmod *oh) { -u32 v, softrst_mask; +u32 v;int c =0 ;int ret =0 ;@@ -1834,19 +1878,7 @@ static int _ocp_softreset(struct omap_hwmod *oh)if (oh->class->sysc->srst_udelay)udelay (oh->class->sysc->srst_udelay); -if (oh->class->sysc->sysc_flags &SYSS_HAS_RESET_STATUS ) -omap_test_timeout ((omap_hwmod_read (oh, - oh->class->sysc->syss_offs) - &SYSS_RESETDONE_MASK ), -MAX_MODULE_SOFTRESET_WAIT , c); -else if (oh->class->sysc->sysc_flags &SYSC_HAS_RESET_STATUS ) { - softrst_mask = (0x1 << oh->class->sysc->sysc_fields->srst_shift); -omap_test_timeout (!(omap_hwmod_read (oh, - oh->class->sysc->sysc_offs) - & softrst_mask), -MAX_MODULE_SOFTRESET_WAIT , c); - } - + c =_wait_softreset_complete (oh);if (c ==MAX_MODULE_SOFTRESET_WAIT )pr_warning ("omap_hwmod: %s: softreset failed (waited %d usec)\n" , oh->name,MAX_MODULE_SOFTRESET_WAIT );@@ -2352,6 +2384,9 @@ static int __init _setup_reset(struct omap_hwmod *oh)if (oh->_state != _HWMOD_STATE_INITIALIZED)return -EINVAL ; +if (oh->flags &HWMOD_EXT_OPT_MAIN_CLK ) +return -EPERM ; +if (oh->rst_lines_cnt ==0 ) { r =_enable (oh);if (r) {arch/arm/mach-omap2/omap_hwmod_44xx_data.c +36
-0@@ -21,6 +21,7 @@#include <linux/io.h> #include <linux/platform_data/gpio-omap.h> #include <linux/power/smartreflex.h> +#include <linux/platform_data/omap_ocp2scp.h> #include <plat/omap_hwmod.h> #include <plat/i2c.h> @@ -2125,6 +2126,14 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = { .name = "mcpdm", .class = &omap44xx_mcpdm_hwmod_class, .clkdm_name = "abe_clkdm", +/* +* It's suspected that the McPDM requires an off-chip main +* functional clock, controlled via I2C. This IP block is +* currently reset very early during boot, before I2C is +* available, so it doesn't seem that we have any choice in +* the kernel other than to avoid resetting it. +*/ + .flags = HWMOD_EXT_OPT_MAIN_CLK, .mpu_irqs = omap44xx_mcpdm_irqs, .sdma_reqs = omap44xx_mcpdm_sdma_reqs, .main_clk = "mcpdm_fck",@@ -2681,6 +2690,32 @@ static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = { .sysc = &omap44xx_ocp2scp_sysc, }; +/* ocp2scp dev_attr */ +static struct resource omap44xx_usb_phy_and_pll_addrs[] = { + { + .name ="usb_phy" , + .start =0x4a0ad080 , + .end =0x4a0ae000 , + .flags =IORESOURCE_MEM , + }, + { +/* XXX: Remove this once control module driver is in place */ + .name ="ctrl_dev" , + .start =0x4a002300 , + .end =0x4a002303 , + .flags =IORESOURCE_MEM , + }, + { } +}; + +static struct omap_ocp2scp_dev ocp2scp_dev_attr[] = { + { + .drv_name ="omap-usb2" , + .res = omap44xx_usb_phy_and_pll_addrs, + }, + { } +}; +/* ocp2scp_usb_phy */ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { .name ="ocp2scp_usb_phy" ,@@ -2694,6 +2729,7 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { .modulemode = MODULEMODE_HWCTRL, }, }, + .dev_attr = ocp2scp_dev_attr, };/* arch/arm/mach-omap2/twl-common.c +2
-1@@ -73,6 +73,7 @@ void __init omap4_pmic_init(const char *pmic_type, {/* PMIC part*/ omap_mux_init_signal ("sys_nirq1" ,OMAP_PIN_INPUT_PULLUP |OMAP_PIN_OFF_WAKEUPENABLE ); +omap_mux_init_signal ("fref_clk0_out.sys_drm_msecure" ,OMAP_PIN_OUTPUT );omap_pmic_init (1 ,400 , pmic_type,7 +OMAP44XX_IRQ_GIC_START , pmic_data);/* Register additional devices on i2c1 bus if needed */ @@ -366,7 +367,7 @@ static struct regulator_init_data omap4_clk32kg_idata = { };static struct regulator_consumer_supply omap4_vdd1_supply[] = { -REGULATOR_SUPPLY ("vcc" ,"mpu.0" ), +REGULATOR_SUPPLY ("vcc" ,"cpu0" ), };static struct regulator_consumer_supply omap4_vdd2_supply[] = {arch/arm/mach-omap2/vc.c +1
-1@@ -264,7 +264,7 @@ static void __init omap_vc_i2c_init(struct voltagedomain *voltdm)if (initialized) {if (voltdm->pmic->i2c_high_speed != i2c_high_speed) -pr_warn ("%s: I2C config for vdd_%s does not match other channels (%u)." , +pr_warn ("%s: I2C config for vdd_%s does not match other channels (%u).\n" , __func__, voltdm->name, i2c_high_speed);return ; }arch/arm/mach-pxa/hx4700.c +7
-1@@ -28,6 +28,7 @@#include <linux/mfd/asic3.h> #include <linux/mtd/physmap.h> #include <linux/pda_power.h> +#include <linux/pwm.h> #include <linux/pwm_backlight.h> #include <linux/regulator/driver.h> #include <linux/regulator/gpio-regulator.h> @@ -556,7 +557,7 @@ static struct platform_device hx4700_lcd = {*/ static struct platform_pwm_backlight_data backlight_data = { - .pwm_id =1 , + .pwm_id =-1 ,/* Superseded by pwm_lookup */ .max_brightness =200 , .dft_brightness =100 , .pwm_period_ns =30923 ,@@ -571,6 +572,10 @@ static struct platform_device backlight = { }, }; +static struct pwm_lookup hx4700_pwm_lookup[] = { +PWM_LOOKUP ("pxa27x-pwm.1" ,0 ,"pwm-backlight" ,NULL ), +}; +/* * USB "Transceiver" */ @@ -872,6 +877,7 @@ static void __init hx4700_init(void)pxa_set_stuart_info (NULL );platform_add_devices (devices,ARRAY_SIZE (devices)); +pwm_add_table (hx4700_pwm_lookup,ARRAY_SIZE (hx4700_pwm_lookup));pxa_set_ficp_info (&ficp_info);pxa27x_set_i2c_power_info (NULL );arch/arm/mach-pxa/spitz_pm.c +2
-6@@ -86,10 +86,7 @@ static void spitz_discharge1(int on)gpio_set_value (SPITZ_GPIO_LED_GREEN , on); } -static unsigned long gpio18_config[] = { -GPIO18_RDY , -GPIO18_GPIO , -}; +static unsigned long gpio18_config =GPIO18_GPIO ;static void spitz_presuspend (void ) {@@ -112,7 +109,7 @@ static void spitz_presuspend(void)PGSR3 &= ~SPITZ_GPIO_G3_STROBE_BIT ;PGSR2 |=GPIO_bit (SPITZ_GPIO_KEY_STROBE0 ); -pxa2xx_mfp_config (&gpio18_config[0 ],1 ); +pxa2xx_mfp_config (&gpio18_config,1 );gpio_request_one (18 ,GPIOF_OUT_INIT_HIGH ,"Unknown" );gpio_free (18 );@@ -131,7 +128,6 @@ static void spitz_presuspend(void)static void spitz_postsuspend (void ) { -pxa2xx_mfp_config (&gpio18_config[1 ],1 ); }static int spitz_should_wakeup (unsigned int resume_on_alarm)arch/arm/mm/alignment.c +1
-1@@ -745,7 +745,7 @@ do_alignment_t32_to_handler(unsigned long *pinstr, struct pt_regs *regs,static int do_alignment (unsigned long addr,unsigned int fsr,struct pt_regs *regs) { -union offset_union offset; +union offset_union uninitialized_var (offset );unsigned long instr =0 , instrptr;int (*handler)(unsigned long addr,unsigned long instr,struct pt_regs *regs);unsigned int type;arch/arm/plat-omap/include/plat/omap_hwmod.h +6
-0@@ -443,6 +443,11 @@ struct omap_hwmod_omap4_prcm {* in order to complete the reset. Optional clocks will be disabled * again after the reset. * HWMOD_16BIT_REG: Module has 16bit registers +* HWMOD_EXT_OPT_MAIN_CLK: The only main functional clock source for +* this IP block comes from an off-chip source and is not always +* enabled. This prevents the hwmod code from being able to +* enable and reset the IP block early. XXX Eventually it should +* be possible to query the clock framework for this information. */ #define HWMOD_SWSUP_SIDLE (1 << 0)#define HWMOD_SWSUP_MSTANDBY (1 << 1)@@ -453,6 +458,7 @@ struct omap_hwmod_omap4_prcm {#define HWMOD_NO_IDLEST (1 << 6)#define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7)#define HWMOD_16BIT_REG (1 << 8) +#define HWMOD_EXT_OPT_MAIN_CLK (1 << 9)/* * omap_hwmod._int_flags definitions arch/arm/tools/Makefile +1
-1@@ -5,6 +5,6 @@ # include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types - $(kecho) ' Generating $@' + @$(kecho) ' Generating $@' @mkdir -p $(dir $@) $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }arch/arm/vfp/vfpmodule.c +6
-3@@ -701,11 +701,14 @@ static int __init vfp_init(void) elf_hwcap |= HWCAP_VFPv3;/* -* Check for VFPv3 D16. CPUs in this configuration -* only have 16 x 64bit registers. +* Check for VFPv3 D16 and VFPv4 D16. CPUs in +* this configuration only have 16 x 64bit +* registers. */ if (((fmrx (MVFR0 ) &MVFR0_A_SIMD_MASK )) ==1 ) - elf_hwcap |= HWCAP_VFPv3D16; + elf_hwcap |= HWCAP_VFPv3D16;/* also v4-D16 */ +else + elf_hwcap |= HWCAP_VFPD32; }#endif /* arch/arm/xen/enlighten.c +11
-0@@ -166,3 +166,14 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) *pages =NULL ; }EXPORT_SYMBOL_GPL (free_xenballooned_pages); + +/* In the hypervisor.S file. */ +EXPORT_SYMBOL_GPL (HYPERVISOR_event_channel_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_grant_table_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_xen_version); +EXPORT_SYMBOL_GPL (HYPERVISOR_console_io); +EXPORT_SYMBOL_GPL (HYPERVISOR_sched_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_hvm_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_memory_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_physdev_op); +EXPORT_SYMBOL_GPL (privcmd_call);arch/arm/xen/hypercall.S +5
-9@@ -48,20 +48,16 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/opcodes-virt.h> #include <xen/interface/xen.h> -/* HVC 0xEA1 */ -#ifdef CONFIG_THUMB2_KERNEL -#define xen_hvc .word 0xf7e08ea1 -#else -#define xen_hvc .word 0xe140ea71 -#endif +#define XEN_IMM 0xEA1 #define HYPERCALL_SIMPLE(hypercall) \ ENTRY(HYPERVISOR_##hypercall) \ mov r12, #__HYPERVISOR_##hypercall; \ - xen_hvc; \ + __HVC(XEN_IMM); \ mov pc, lr; \ ENDPROC(HYPERVISOR_##hypercall)@@ -76,7 +72,7 @@ ENTRY(HYPERVISOR_##hypercall) \ stmdb sp!, {r4} \ ldr r4, [sp, #4] \ mov r12, #__HYPERVISOR_##hypercall; \ - xen_hvc \ + __HVC(XEN_IMM); \ ldm sp!, {r4} \ mov pc, lr \ ENDPROC(HYPERVISOR_##hypercall)@@ -100,7 +96,7 @@ ENTRY(privcmd_call) mov r2, r3 ldr r3, [sp, #8] ldr r4, [sp, #4] - xen_hvc + __HVC(XEN_IMM) ldm sp!, {r4} mov pc, lr ENDPROC(privcmd_call);arch/arm64/Kconfig +1
-0@@ -1,6 +1,7 @@ config ARM64 def_bool y select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE + select ARCH_WANT_COMPAT_IPC_PARSE_VERSION select GENERIC_CLOCKEVENTS select GENERIC_HARDIRQS_NO_DEPRECATED select GENERIC_IOMAParch/arm64/include/asm/elf.h +1
-4@@ -25,12 +25,10 @@#include <asm/user.h> typedef unsigned long elf_greg_t ; -typedef unsigned long elf_freg_t [3 ];#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))typedef elf_greg_t elf_gregset_t [ELF_NGREG ]; - -typedef struct user_fp elf_fpregset_t ; +typedef struct user_fpsimd_state elf_fpregset_t ;#define EM_AARCH64 183@@ -87,7 +85,6 @@ typedef struct user_fp elf_fpregset_t;#define R_AARCH64_MOVW_PREL_G2_NC 292#define R_AARCH64_MOVW_PREL_G3 293 -/* * These are used to set parameters in the core dumps. */ arch/arm64/include/asm/fpsimd.h +2
-3@@ -25,9 +25,8 @@* - FPSR and FPCR * - 32 128-bit data registers * -* Note that user_fp forms a prefix of this structure, which is relied -* upon in the ptrace FP/SIMD accessors. struct user_fpsimd_state must -* form a prefix of struct fpsimd_state. +* Note that user_fpsimd forms a prefix of this structure, which is +* relied upon in the ptrace FP/SIMD accessors. */ struct fpsimd_state { union {arch/arm64/include/asm/io.h +5
-5@@ -114,7 +114,7 @@ static inline u64 __raw_readq(const volatile void __iomem *addr)* I/O port access primitives. */ #define IO_SPACE_LIMIT 0xffff -#define PCI_IOBASE ((void __iomem *)0xffffffbbfffe0000UL) +#define PCI_IOBASE ((void __iomem *)(MODULES_VADDR - SZ_2M))static inline u8 inb (unsigned long addr) {@@ -222,12 +222,12 @@ extern void __iomem *__ioremap(phys_addr_t phys_addr, size_t size, pgprot_t protextern void __iounmap (volatile void __iomem *addr);#define PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_DIRTY) -#define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_XN | PTE_ATTRINDX(MT_DEVICE_nGnRE)) +#define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE))#define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC)) -#define ioremap (addr, size) __ioremap((addr), (size), PROT_DEVICE_nGnRE) -#define ioremap_nocache (addr, size) __ioremap((addr), (size), PROT_DEVICE_nGnRE) -#define ioremap_wc (addr, size) __ioremap((addr), (size), PROT_NORMAL_NC) +#define ioremap (addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) +#define ioremap_nocache (addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) +#define ioremap_wc (addr, size) __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))#define iounmap __iounmap#define ARCH_HAS_IOREMAP_WC arch/arm64/include/asm/pgtable-hwdef.h +4
-2@@ -38,7 +38,8 @@#define PMD_SECT_S (_AT(pmdval_t, 3) << 8)#define PMD_SECT_AF (_AT(pmdval_t, 1) << 10)#define PMD_SECT_NG (_AT(pmdval_t, 1) << 11) -#define PMD_SECT_XN (_AT(pmdval_t, 1) << 54) +#define PMD_SECT_PXN (_AT(pmdval_t, 1) << 53) +#define PMD_SECT_UXN (_AT(pmdval_t, 1) << 54)/* * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). @@ -57,7 +58,8 @@#define PTE_SHARED (_AT(pteval_t, 3) << 8)/* SH[1:0], inner shareable */ #define PTE_AF (_AT(pteval_t, 1) << 10)/* Access Flag */ #define PTE_NG (_AT(pteval_t, 1) << 11)/* nG */ -#define PTE_XN (_AT(pteval_t, 1) << 54)/* XN */ +#define PTE_PXN (_AT(pteval_t, 1) << 53)/* Privileged XN */ +#define PTE_UXN (_AT(pteval_t, 1) << 54)/* User XN */ /* * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). arch/arm64/include/asm/pgtable.h +20
-20@@ -62,23 +62,23 @@ extern pgprot_t pgprot_default;#define _MOD_PROT (p, b) __pgprot(pgprot_val(p) | (b)) -#define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_XN | PTE_RDONLY) -#define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN) -#define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG) -#define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define PAGE_COPY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_RDONLY) -#define PAGE_READONLY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define PAGE_READONLY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_RDONLY) -#define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_XN | PTE_DIRTY) -#define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_DIRTY) - -#define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_XN | PTE_RDONLY) -#define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN) -#define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG) -#define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define __PAGE_COPY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_RDONLY) -#define __PAGE_READONLY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define __PAGE_READONLY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_RDONLY) +#define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) +#define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN) +#define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define PAGE_COPY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) +#define PAGE_READONLY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define PAGE_READONLY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) +#define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_PXN | PTE_UXN | PTE_DIRTY) +#define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_UXN | PTE_DIRTY) + +#define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) +#define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN) +#define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define __PAGE_COPY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) +#define __PAGE_READONLY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define __PAGE_READONLY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY)#endif /* __ASSEMBLY__ */ @@ -130,10 +130,10 @@ extern struct page *empty_zero_page;#define pte_young (pte) (pte_val(pte) & PTE_AF)#define pte_special (pte) (pte_val(pte) & PTE_SPECIAL)#define pte_write (pte) (!(pte_val(pte) & PTE_RDONLY)) -#define pte_exec (pte) (!(pte_val(pte) & PTE_XN)) +#define pte_exec (pte) (!(pte_val(pte) & PTE_UXN))#define pte_present_exec_user (pte) \ - ((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_XN)) == \ + ((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_UXN)) == \ (PTE_VALID | PTE_USER))#define PTE_BIT_FUNC (fn,op) \@@ -262,7 +262,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)static inline pte_t pte_modify (pte_t pte,pgprot_t newprot) { -const pteval_t mask =PTE_USER |PTE_XN |PTE_RDONLY ; +const pteval_t mask =PTE_USER |PTE_PXN |PTE_UXN |PTE_RDONLY ;pte_val (pte) = (pte_val (pte) & ~mask) | (pgprot_val (newprot) & mask);return pte; }arch/arm64/include/asm/processor.h +2
-0@@ -43,6 +43,8 @@#else #define STACK_TOP STACK_TOP_MAX#endif /* CONFIG_COMPAT */ + +#define ARCH_LOW_ADDRESS_LIMIT PHYS_MASK#endif /* __KERNEL__ */ struct debug_info {arch/arm64/include/asm/unistd.h +0
-1@@ -14,7 +14,6 @@* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifdef CONFIG_COMPAT -#define __ARCH_WANT_COMPAT_IPC_PARSE_VERSION#define __ARCH_WANT_COMPAT_STAT64#define __ARCH_WANT_SYS_GETHOSTNAME#define __ARCH_WANT_SYS_PAUSEarch/arm64/kernel/perf_event.c +2
-8@@ -613,17 +613,11 @@ enum armv8_pmuv3_perf_types {ARMV8_PMUV3_PERFCTR_BUS_ACCESS =0x19 ,ARMV8_PMUV3_PERFCTR_MEM_ERROR =0x1A , ARMV8_PMUV3_PERFCTR_BUS_CYCLES = 0x1D, - -/* -* This isn't an architected event. -* We detect this event number and use the cycle counter instead. -*/ - ARMV8_PMUV3_PERFCTR_CPU_CYCLES = 0xFF, };/* PMUv3 HW events mapping. */ static const unsigned armv8_pmuv3_perf_map[PERF_COUNT_HW_MAX ] = { - [PERF_COUNT_HW_CPU_CYCLES ] =ARMV8_PMUV3_PERFCTR_CPU_CYCLES , + [PERF_COUNT_HW_CPU_CYCLES ] =ARMV8_PMUV3_PERFCTR_CLOCK_CYCLES , [PERF_COUNT_HW_INSTRUCTIONS ] =ARMV8_PMUV3_PERFCTR_INSTR_EXECUTED , [PERF_COUNT_HW_CACHE_REFERENCES ] =ARMV8_PMUV3_PERFCTR_L1_DCACHE_ACCESS , [PERF_COUNT_HW_CACHE_MISSES] = ARMV8_PMUV3_PERFCTR_L1_DCACHE_REFILL,@@ -1106,7 +1100,7 @@ static int armv8pmu_get_event_idx(struct pmu_hw_events *cpuc,unsigned long evtype = event->config_base &ARMV8_EVTYPE_EVENT ;/* Always place a cycle counter into the cycle counter. */ -if (evtype ==ARMV8_PMUV3_PERFCTR_CPU_CYCLES ) { +if (evtype ==ARMV8_PMUV3_PERFCTR_CLOCK_CYCLES ) {if (test_and_set_bit (ARMV8_IDX_CYCLE_COUNTER , cpuc->used_mask))return -EAGAIN ;arch/arm64/kernel/process.c +0
-18@@ -310,24 +310,6 @@ struct task_struct *__switch_to(struct task_struct *prev, }/* -* Fill in the task's elfregs structure for a core dump. -*/ -int dump_task_regs (struct task_struct *t,elf_gregset_t *elfregs) -{ -elf_core_copy_regs (elfregs,task_pt_regs (t)); -return 1 ; -} - -/* -* fill in the fpe structure for a core dump... -*/ -int dump_fpu (struct pt_regs *regs,struct user_fp *fp) -{ -return 0 ; -} -EXPORT_SYMBOL (dump_fpu); - -/* * Shuffle the argument into the correct register before calling the * thread function. x1 is the thread argument, x2 is the pointer to * the thread function, and x3 points to the exit function. arch/arm64/kernel/smp.c +1
-2@@ -211,8 +211,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void)* before we continue. */ set_cpu_online (cpu, true); -while (!cpu_active (cpu)) -cpu_relax (); +complete (&cpu_running);/* * OK, it's off to the idle thread for us arch/arm64/mm/init.c +1
-1@@ -80,7 +80,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)#ifdef CONFIG_ZONE_DMA32 /* 4GB maximum for 32-bit only capable devices */ max_dma32 =min (max,MAX_DMA32_PFN ); - zone_size[ZONE_DMA32 ] = max_dma32 - min; + zone_size[ZONE_DMA32 ] =max (min, max_dma32) - min;#endif zone_size[ZONE_NORMAL ] = max - max_dma32;arch/frv/Kconfig +1
-0@@ -13,6 +13,7 @@ config FRV select GENERIC_CPU_DEVICES select ARCH_WANT_IPC_PARSE_VERSION select GENERIC_KERNEL_THREAD + select GENERIC_KERNEL_EXECVE config ZONE_DMA boolarch/frv/boot/Makefile +6
-4@@ -17,6 +17,8 @@ PARAMS_PHYS = 0x0207c000 INITRD_PHYS = 0x02180000 INITRD_VIRT = 0x02180000 +OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment + # # If you don't define ZRELADDR above, # then it defaults to ZTEXTADDR@@ -32,18 +34,18 @@ Image: $(obj)/Image targets: $(obj)/Image $(obj)/Image: vmlinux FORCE - $(OBJCOPY) -O binary -R .note -R .comment -S vmlinux $@ + $(OBJCOPY) $(OBJCOPYFLAGS) -S vmlinux $@ #$(obj)/Image: $(CONFIGURE) $(SYSTEM) -# $(OBJCOPY) -O binary -R .note -R .comment -g -S $(SYSTEM) $@ +# $(OBJCOPY) $(OBJCOPYFLAGS) -g -S $(SYSTEM) $@ bzImage: zImage zImage: $(CONFIGURE) compressed/$(LINUX) - $(OBJCOPY) -O binary -R .note -R .comment -S compressed/$(LINUX) $@ + $(OBJCOPY) $(OBJCOPYFLAGS) -S compressed/$(LINUX) $@ bootpImage: bootp/bootp - $(OBJCOPY) -O binary -R .note -R .comment -S bootp/bootp $@ + $(OBJCOPY) $(OBJCOPYFLAGS) -S bootp/bootp $@ compressed/$(LINUX): $(LINUX) dep @$(MAKE) -C compressed $(LINUX)arch/frv/include/asm/unistd.h +0
-1@@ -30,7 +30,6 @@#define __ARCH_WANT_SYS_RT_SIGACTION#define __ARCH_WANT_SYS_RT_SIGSUSPEND#define __ARCH_WANT_SYS_EXECVE -#define __ARCH_WANT_KERNEL_EXECVE/* * "Conditional" syscalls arch/frv/kernel/entry.S +3
-25@@ -869,11 +869,6 @@ ret_from_kernel_thread: call schedule_tail calll.p @(gr21,gr0) or gr20,gr20,gr8 - bra sys_exit - - .globl ret_from_kernel_execve -ret_from_kernel_execve: - ori gr28,0,sp bra __syscall_exit ###################################################################################################@@ -1080,27 +1075,10 @@ __entry_return_from_kernel_interrupt: subicc gr5,#0,gr0,icc0 beq icc0,#0,__entry_return_direct -__entry_preempt_need_resched: - ldi @(gr15,#TI_FLAGS),gr4 - andicc gr4,#_TIF_NEED_RESCHED,gr0,icc0 - beq icc0,#1,__entry_return_direct - - setlos #PREEMPT_ACTIVE,gr5 - sti gr5,@(gr15,#TI_FLAGS) - - andi gr23,#~PSR_PIL,gr23 - movgs gr23,psr - - call schedule - sti gr0,@(gr15,#TI_PRE_COUNT) - - movsg psr,gr23 - ori gr23,#PSR_PIL_14,gr23 - movgs gr23,psr - bra __entry_preempt_need_resched -#else - bra __entry_return_direct + subcc gr0,gr0,gr0,icc2 /* set Z and clear C */ + call preempt_schedule_irq #endif + bra __entry_return_direct ###############################################################################arch/frv/kernel/process.c +3
-2@@ -181,6 +181,9 @@ int copy_thread(unsigned long clone_flags, childregs = (struct pt_regs *) (task_stack_page (p) +THREAD_SIZE -FRV_FRAME0_SIZE ); +/* set up the userspace frame (the only place that the USP is stored) */ + *childregs = *__kernel_frame0_ptr; + p->set_child_tid = p->clear_child_tid =NULL ; p->thread.frame = childregs;@@ -191,10 +194,8 @@ int copy_thread(unsigned long clone_flags, p->thread.frame0 = childregs;if (unlikely (!regs)) { -memset (childregs,0 ,sizeof (struct pt_regs )); childregs->gr9 = usp;/* function */ childregs->gr8 = arg; - childregs->psr =PSR_S ; p->thread.pc = (unsigned long ) ret_from_kernel_thread;save_user_regs (p->thread.user);return 0 ;arch/frv/mb93090-mb00/pci-dma-nommu.c +1
-0@@ -11,6 +11,7 @@#include <linux/types.h> #include <linux/slab.h> +#include <linux/export.h> #include <linux/dma-mapping.h> #include <linux/list.h> #include <linux/pci.h> arch/h8300/include/asm/cache.h +2
-1@@ -2,7 +2,8 @@#define __ARCH_H8300_CACHE_H/* bytes per L1 cache line */ -#define L1_CACHE_BYTES 4 +#define L1_CACHE_SHIFT 2 +#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)/* m68k-elf-gcc 2.95.2 doesn't like these */ arch/ia64/mm/init.c +0
-1@@ -637,7 +637,6 @@ mem_init (void) high_memory =__va (max_low_pfn *PAGE_SIZE ); -reset_zone_present_pages ();for_each_online_pgdat (pgdat)if (pgdat->bdata->node_bootmem_map) totalram_pages +=free_all_bootmem_node (pgdat);arch/m68k/include/asm/signal.h +3
-3@@ -41,7 +41,7 @@ struct k_sigaction {static inline void sigaddset (sigset_t *set,int _sig) { asm ("bfset %0{%1,#1}" - :"+od" (*set) + :"+o" (*set) :"id" ((_sig -1 ) ^31 ) :"cc" ); }@@ -49,7 +49,7 @@ static inline void sigaddset(sigset_t *set, int _sig)static inline void sigdelset (sigset_t *set,int _sig) { asm ("bfclr %0{%1,#1}" - :"+od" (*set) + :"+o" (*set) :"id" ((_sig -1 ) ^31 ) :"cc" ); }@@ -65,7 +65,7 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)int ret; asm ("bfextu %1{%2,#1},%0" :"=d" (ret) - :"od" (*set),"id" ((_sig-1 ) ^31 ) + :"o" (*set),"id" ((_sig-1 ) ^31 ) :"cc" );return ret; }arch/mips/cavium-octeon/executive/cvmx-l2c.c deleted +0
-900@@ -1,900 +0,0 @@ -/***********************license start*************** -* Author: Cavium Networks -* -* Contact: [email protected] -* This file is part of the OCTEON SDK -* -* Copyright (c) 2003-2010 Cavium Networks -* -* This file is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License, Version 2, as -* published by the Free Software Foundation. -* -* This file is distributed in the hope that it will be useful, but -* AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty -* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or -* NONINFRINGEMENT. See the GNU General Public License for more -* details. -* -* You should have received a copy of the GNU General Public License -* along with this file; if not, write to the Free Software -* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -* or visit http://www.gnu.org/licenses/. -* -* This file may also be available under a different license from Cavium. -* Contact Cavium Networks for more information -***********************license end**************************************/ - -/* -* Implementation of the Level 2 Cache (L2C) control, -* measurement, and debugging facilities. -*/ - -#include <asm/octeon/cvmx.h> -#include <asm/octeon/cvmx-l2c.h> -#include <asm/octeon/cvmx-spinlock.h> - -/* -* This spinlock is used internally to ensure that only one core is -* performing certain L2 operations at a time. -* -* NOTE: This only protects calls from within a single application - -* if multiple applications or operating systems are running, then it -* is up to the user program to coordinate between them. -*/ -cvmx_spinlock_t cvmx_l2c_spinlock; - -int cvmx_l2c_get_core_way_partition (uint32_t core) -{ -uint32_t field; - -/* Validate the core number */ -if (core >=cvmx_octeon_num_cores ()) -return -1 ; - -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) -return cvmx_read_csr (CVMX_L2C_WPAR_PPX (core)) &0xffff ; - -/* -* Use the lower two bits of the coreNumber to determine the -* bit offset of the UMSK[] field in the L2C_SPAR register. -*/ - field = (core &0x3 ) *8 ; - -/* -* Return the UMSK[] field from the appropriate L2C_SPAR -* register based on the coreNumber. -*/ - -switch (core &0xC ) { -case 0x0 : -return (cvmx_read_csr (CVMX_L2C_SPAR0 ) & (0xFF << field)) >> field; -case 0x4 : -return (cvmx_read_csr (CVMX_L2C_SPAR1 ) & (0xFF << field)) >> field; -case 0x8 : -return (cvmx_read_csr (CVMX_L2C_SPAR2 ) & (0xFF << field)) >> field; -case 0xC : -return (cvmx_read_csr (CVMX_L2C_SPAR3 ) & (0xFF << field)) >> field; - } -return 0 ; -} - -int cvmx_l2c_set_core_way_partition (uint32_t core,uint32_t mask) -{ -uint32_t field; -uint32_t valid_mask; - - valid_mask = (0x1 <<cvmx_l2c_get_num_assoc ()) -1 ; - - mask &= valid_mask; - -/* A UMSK setting which blocks all L2C Ways is an error on some chips */ -if (mask == valid_mask && !OCTEON_IS_MODEL (OCTEON_CN63XX )) -return -1 ; - -/* Validate the core number */ -if (core >=cvmx_octeon_num_cores ()) -return -1 ; - -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -cvmx_write_csr (CVMX_L2C_WPAR_PPX (core), mask); -return 0 ; - } - -/* -* Use the lower two bits of core to determine the bit offset of the -* UMSK[] field in the L2C_SPAR register. -*/ - field = (core &0x3 ) *8 ; - -/* -* Assign the new mask setting to the UMSK[] field in the appropriate -* L2C_SPAR register based on the core_num. -* -*/ -switch (core &0xC ) { -case 0x0 : -cvmx_write_csr (CVMX_L2C_SPAR0 , - (cvmx_read_csr (CVMX_L2C_SPAR0 ) & ~(0xFF << field)) | - mask << field); -break ; -case 0x4 : -cvmx_write_csr (CVMX_L2C_SPAR1 , - (cvmx_read_csr (CVMX_L2C_SPAR1 ) & ~(0xFF << field)) | - mask << field); -break ; -case 0x8 : -cvmx_write_csr (CVMX_L2C_SPAR2 , - (cvmx_read_csr (CVMX_L2C_SPAR2 ) & ~(0xFF << field)) | - mask << field); -break ; -case 0xC : -cvmx_write_csr (CVMX_L2C_SPAR3 , - (cvmx_read_csr (CVMX_L2C_SPAR3 ) & ~(0xFF << field)) | - mask << field); -break ; - } -return 0 ; -} - -int cvmx_l2c_set_hw_way_partition (uint32_t mask) -{ -uint32_t valid_mask; - - valid_mask = (0x1 <<cvmx_l2c_get_num_assoc ()) -1 ; - mask &= valid_mask; - -/* A UMSK setting which blocks all L2C Ways is an error on some chips */ -if (mask == valid_mask && !OCTEON_IS_MODEL (OCTEON_CN63XX )) -return -1 ; - -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) -cvmx_write_csr (CVMX_L2C_WPAR_IOBX (0 ), mask); -else -cvmx_write_csr (CVMX_L2C_SPAR4 , - (cvmx_read_csr (CVMX_L2C_SPAR4 ) & ~0xFF ) | mask); -return 0 ; -} - -int cvmx_l2c_get_hw_way_partition (void ) -{ -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) -return cvmx_read_csr (CVMX_L2C_WPAR_IOBX (0 )) &0xffff ; -else -return cvmx_read_csr (CVMX_L2C_SPAR4 ) & (0xFF ); -} - -void cvmx_l2c_config_perf (uint32_t counter,enum cvmx_l2c_event event, -uint32_t clear_on_read) -{ -if (OCTEON_IS_MODEL (OCTEON_CN5XXX ) ||OCTEON_IS_MODEL (OCTEON_CN3XXX )) { -union cvmx_l2c_pfctl pfctl; - - pfctl.u64 =cvmx_read_csr (CVMX_L2C_PFCTL ); - -switch (counter) { -case 0 : - pfctl.s.cnt0sel = event; - pfctl.s.cnt0ena =1 ; - pfctl.s.cnt0rdclr = clear_on_read; -break ; -case 1 : - pfctl.s.cnt1sel = event; - pfctl.s.cnt1ena =1 ; - pfctl.s.cnt1rdclr = clear_on_read; -break ; -case 2 : - pfctl.s.cnt2sel = event; - pfctl.s.cnt2ena =1 ; - pfctl.s.cnt2rdclr = clear_on_read; -break ; -case 3 : -default : - pfctl.s.cnt3sel = event; - pfctl.s.cnt3ena =1 ; - pfctl.s.cnt3rdclr = clear_on_read; -break ; - } - -cvmx_write_csr (CVMX_L2C_PFCTL , pfctl.u64); - }else { -union cvmx_l2c_tadx_prf l2c_tadx_prf; -int tad; - -cvmx_dprintf ("L2C performance counter events are different for this chip, mapping 'event' to cvmx_l2c_tad_event_t\n" ); -if (clear_on_read) -cvmx_dprintf ("L2C counters don't support clear on read for this chip\n" ); - - l2c_tadx_prf.u64 =cvmx_read_csr (CVMX_L2C_TADX_PRF (0 )); - -switch (counter) { -case 0 : - l2c_tadx_prf.s.cnt0sel = event; -break ; -case 1 : - l2c_tadx_prf.s.cnt1sel = event; -break ; -case 2 : - l2c_tadx_prf.s.cnt2sel = event; -break ; -default : -case 3 : - l2c_tadx_prf.s.cnt3sel = event; -break ; - } -for (tad =0 ; tad <CVMX_L2C_TADS ; tad++) -cvmx_write_csr (CVMX_L2C_TADX_PRF (tad), - l2c_tadx_prf.u64); - } -} - -uint64_t cvmx_l2c_read_perf (uint32_t counter) -{ -switch (counter) { -case 0 : -if (OCTEON_IS_MODEL (OCTEON_CN5XXX ) ||OCTEON_IS_MODEL (OCTEON_CN3XXX )) -return cvmx_read_csr (CVMX_L2C_PFC0 ); -else { -uint64_t counter =0 ; -int tad; -for (tad =0 ; tad <CVMX_L2C_TADS ; tad++) - counter +=cvmx_read_csr (CVMX_L2C_TADX_PFC0 (tad)); -return counter; - } -case 1 : -if (OCTEON_IS_MODEL (OCTEON_CN5XXX ) ||OCTEON_IS_MODEL (OCTEON_CN3XXX )) -return cvmx_read_csr (CVMX_L2C_PFC1 ); -else { -uint64_t counter =0 ; -int tad; -for (tad =0 ; tad <CVMX_L2C_TADS ; tad++) - counter +=cvmx_read_csr (CVMX_L2C_TADX_PFC1 (tad)); -return counter; - } -case 2 : -if (OCTEON_IS_MODEL (OCTEON_CN5XXX ) ||OCTEON_IS_MODEL (OCTEON_CN3XXX )) -return cvmx_read_csr (CVMX_L2C_PFC2 ); -else { -uint64_t counter =0 ; -int tad; -for (tad =0 ; tad <CVMX_L2C_TADS ; tad++) - counter +=cvmx_read_csr (CVMX_L2C_TADX_PFC2 (tad)); -return counter; - } -case 3 : -default : -if (OCTEON_IS_MODEL (OCTEON_CN5XXX ) ||OCTEON_IS_MODEL (OCTEON_CN3XXX )) -return cvmx_read_csr (CVMX_L2C_PFC3 ); -else { -uint64_t counter =0 ; -int tad; -for (tad =0 ; tad <CVMX_L2C_TADS ; tad++) - counter +=cvmx_read_csr (CVMX_L2C_TADX_PFC3 (tad)); -return counter; - } - } -} - -/** -* @INTERNAL -* Helper function use to fault in cache lines for L2 cache locking -* -* @addr: Address of base of memory region to read into L2 cache -* @len: Length (in bytes) of region to fault in -*/ -static void fault_in (uint64_t addr,int len) -{ -volatile char *ptr; -volatile char dummy; -/* -* Adjust addr and length so we get all cache lines even for -* small ranges spanning two cache lines. -*/ - len += addr &CVMX_CACHE_LINE_MASK ; - addr &= ~CVMX_CACHE_LINE_MASK ; - ptr = (volatile char *)cvmx_phys_to_ptr (addr); -/* -* Invalidate L1 cache to make sure all loads result in data -* being in L2. -*/ -CVMX_DCACHE_INVALIDATE ; -while (len >0 ) { - dummy += *ptr; - len -=CVMX_CACHE_LINE_SIZE ; - ptr +=CVMX_CACHE_LINE_SIZE ; - } -} - -int cvmx_l2c_lock_line (uint64_t addr) -{ -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -int shift =CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ; -uint64_t assoc =cvmx_l2c_get_num_assoc (); -uint64_t tag = addr >> shift; -uint64_t index =CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS ,cvmx_l2c_address_to_index (addr) <<CVMX_L2C_IDX_ADDR_SHIFT ); -uint64_t way; -union cvmx_l2c_tadx_tag l2c_tadx_tag; - -CVMX_CACHE_LCKL2 (CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , addr),0 ); - -/* Make sure we were able to lock the line */ -for (way =0 ; way < assoc; way++) { -CVMX_CACHE_LTGL2I (index | (way << shift),0 ); -/* make sure CVMX_L2C_TADX_TAG is updated */ -CVMX_SYNC ; - l2c_tadx_tag.u64 =cvmx_read_csr (CVMX_L2C_TADX_TAG (0 )); -if (l2c_tadx_tag.s.valid && l2c_tadx_tag.s.tag == tag) -break ; - } - -/* Check if a valid line is found */ -if (way >= assoc) { -/* cvmx_dprintf("ERROR: cvmx_l2c_lock_line: line not found for locking at 0x%llx address\n", (unsigned long long)addr); */ -return -1 ; - } - -/* Check if lock bit is not set */ -if (!l2c_tadx_tag.s.lock) { -/* cvmx_dprintf("ERROR: cvmx_l2c_lock_line: Not able to lock at 0x%llx address\n", (unsigned long long)addr); */ -return -1 ; - } -return way; - }else { -int retval =0 ; -union cvmx_l2c_dbg l2cdbg; -union cvmx_l2c_lckbase lckbase; -union cvmx_l2c_lckoff lckoff; -union cvmx_l2t_err l2t_err; - -cvmx_spinlock_lock (&cvmx_l2c_spinlock); - - l2cdbg.u64 =0 ; - lckbase.u64 =0 ; - lckoff.u64 =0 ; - -/* Clear l2t error bits if set */ - l2t_err.u64 =cvmx_read_csr (CVMX_L2T_ERR ); - l2t_err.s.lckerr =1 ; - l2t_err.s.lckerr2 =1 ; -cvmx_write_csr (CVMX_L2T_ERR , l2t_err.u64); - - addr &= ~CVMX_CACHE_LINE_MASK ; - -/* Set this core as debug core */ - l2cdbg.s.ppnum =cvmx_get_core_num (); -CVMX_SYNC ; -cvmx_write_csr (CVMX_L2C_DBG , l2cdbg.u64); -cvmx_read_csr (CVMX_L2C_DBG ); - - lckoff.s.lck_offset =0 ;/* Only lock 1 line at a time */ -cvmx_write_csr (CVMX_L2C_LCKOFF , lckoff.u64); -cvmx_read_csr (CVMX_L2C_LCKOFF ); - -if (((union cvmx_l2c_cfg )(cvmx_read_csr (CVMX_L2C_CFG ))).s.idxalias) { -int alias_shift =CVMX_L2C_IDX_ADDR_SHIFT +2 *CVMX_L2_SET_BITS -1 ; -uint64_t addr_tmp = addr ^ (addr & ((1 << alias_shift) -1 )) >>CVMX_L2_SET_BITS ; - lckbase.s.lck_base = addr_tmp >>7 ; - }else { - lckbase.s.lck_base = addr >>7 ; - } - - lckbase.s.lck_ena =1 ; -cvmx_write_csr (CVMX_L2C_LCKBASE , lckbase.u64); -/* Make sure it gets there */ -cvmx_read_csr (CVMX_L2C_LCKBASE ); - -fault_in (addr,CVMX_CACHE_LINE_SIZE ); - - lckbase.s.lck_ena =0 ; -cvmx_write_csr (CVMX_L2C_LCKBASE , lckbase.u64); -/* Make sure it gets there */ -cvmx_read_csr (CVMX_L2C_LCKBASE ); - -/* Stop being debug core */ -cvmx_write_csr (CVMX_L2C_DBG ,0 ); -cvmx_read_csr (CVMX_L2C_DBG ); - - l2t_err.u64 =cvmx_read_csr (CVMX_L2T_ERR ); -if (l2t_err.s.lckerr || l2t_err.s.lckerr2) - retval =1 ;/* We were unable to lock the line */ - -cvmx_spinlock_unlock (&cvmx_l2c_spinlock); -return retval; - } -} - -int cvmx_l2c_lock_mem_region (uint64_t start,uint64_t len) -{ -int retval =0 ; - -/* Round start/end to cache line boundaries */ - len += start &CVMX_CACHE_LINE_MASK ; - start &= ~CVMX_CACHE_LINE_MASK ; - len = (len +CVMX_CACHE_LINE_MASK ) & ~CVMX_CACHE_LINE_MASK ; - -while (len) { - retval +=cvmx_l2c_lock_line (start); - start +=CVMX_CACHE_LINE_SIZE ; - len -=CVMX_CACHE_LINE_SIZE ; - } -return retval; -} - -void cvmx_l2c_flush (void ) -{ -uint64_t assoc, set; -uint64_t n_assoc, n_set; - - n_set =cvmx_l2c_get_num_sets (); - n_assoc =cvmx_l2c_get_num_assoc (); - -if (OCTEON_IS_MODEL (OCTEON_CN6XXX )) { -uint64_t address; -/* These may look like constants, but they aren't... */ -int assoc_shift =CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ; -int set_shift =CVMX_L2C_IDX_ADDR_SHIFT ; -for (set =0 ; set < n_set; set++) { -for (assoc =0 ; assoc < n_assoc; assoc++) { - address =CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , - (assoc << assoc_shift) | (set << set_shift)); -CVMX_CACHE_WBIL2I (address,0 ); - } - } - }else { -for (set =0 ; set < n_set; set++) -for (assoc =0 ; assoc < n_assoc; assoc++) -cvmx_l2c_flush_line (assoc, set); - } -} - - -int cvmx_l2c_unlock_line (uint64_t address) -{ - -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -int assoc; -union cvmx_l2c_tag tag; -uint32_t tag_addr; -uint32_t index =cvmx_l2c_address_to_index (address); - - tag_addr = ((address >>CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) & ((1 <<CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) -1 )); - -/* -* For 63XX, we can flush a line by using the physical -* address directly, so finding the cache line used by -* the address is only required to provide the proper -* return value for the function. -*/ -for (assoc =0 ; assoc <CVMX_L2_ASSOC ; assoc++) { - tag =cvmx_l2c_get_tag (assoc, index); - -if (tag.s.V && (tag.s.addr == tag_addr)) { -CVMX_CACHE_WBIL2 (CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , address),0 ); -return tag.s.L; - } - } - }else { -int assoc; -union cvmx_l2c_tag tag; -uint32_t tag_addr; - -uint32_t index =cvmx_l2c_address_to_index (address); - -/* Compute portion of address that is stored in tag */ - tag_addr = ((address >>CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) & ((1 <<CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) -1 )); -for (assoc =0 ; assoc <CVMX_L2_ASSOC ; assoc++) { - tag =cvmx_l2c_get_tag (assoc, index); - -if (tag.s.V && (tag.s.addr == tag_addr)) { -cvmx_l2c_flush_line (assoc, index); -return tag.s.L; - } - } - } -return 0 ; -} - -int cvmx_l2c_unlock_mem_region (uint64_t start,uint64_t len) -{ -int num_unlocked =0 ; -/* Round start/end to cache line boundaries */ - len += start &CVMX_CACHE_LINE_MASK ; - start &= ~CVMX_CACHE_LINE_MASK ; - len = (len +CVMX_CACHE_LINE_MASK ) & ~CVMX_CACHE_LINE_MASK ; -while (len >0 ) { - num_unlocked +=cvmx_l2c_unlock_line (start); - start +=CVMX_CACHE_LINE_SIZE ; - len -=CVMX_CACHE_LINE_SIZE ; - } - -return num_unlocked; -} - -/* -* Internal l2c tag types. These are converted to a generic structure -* that can be used on all chips. -*/ -union __cvmx_l2c_tag { -uint64_t u64; -struct cvmx_l2c_tag_cn50xx { -uint64_t reserved:40 ; -uint64_t V:1 ;/* Line valid */ -uint64_t D:1 ;/* Line dirty */ -uint64_t L:1 ;/* Line locked */ -uint64_t U:1 ;/* Use, LRU eviction */ -uint64_t addr:20 ;/* Phys mem addr (33..14) */ - } cn50xx; -struct cvmx_l2c_tag_cn30xx { -uint64_t reserved:41 ; -uint64_t V:1 ;/* Line valid */ -uint64_t D:1 ;/* Line dirty */ -uint64_t L:1 ;/* Line locked */ -uint64_t U:1 ;/* Use, LRU eviction */ -uint64_t addr:19 ;/* Phys mem addr (33..15) */ - } cn30xx; -struct cvmx_l2c_tag_cn31xx { -uint64_t reserved:42 ; -uint64_t V:1 ;/* Line valid */ -uint64_t D:1 ;/* Line dirty */ -uint64_t L:1 ;/* Line locked */ -uint64_t U:1 ;/* Use, LRU eviction */ -uint64_t addr:18 ;/* Phys mem addr (33..16) */ - } cn31xx; -struct cvmx_l2c_tag_cn38xx { -uint64_t reserved:43 ; -uint64_t V:1 ;/* Line valid */ -uint64_t D:1 ;/* Line dirty */ -uint64_t L:1 ;/* Line locked */ -uint64_t U:1 ;/* Use, LRU eviction */ -uint64_t addr:17 ;/* Phys mem addr (33..17) */ - } cn38xx; -struct cvmx_l2c_tag_cn58xx { -uint64_t reserved:44 ; -uint64_t V:1 ;/* Line valid */ -uint64_t D:1 ;/* Line dirty */ -uint64_t L:1 ;/* Line locked */ -uint64_t U:1 ;/* Use, LRU eviction */ -uint64_t addr:16 ;/* Phys mem addr (33..18) */ - } cn58xx; -struct cvmx_l2c_tag_cn58xx cn56xx;/* 2048 sets */ -struct cvmx_l2c_tag_cn31xx cn52xx;/* 512 sets */ -}; - - -/** -* @INTERNAL -* Function to read a L2C tag. This code make the current core -* the 'debug core' for the L2. This code must only be executed by -* 1 core at a time. -* -* @assoc: Association (way) of the tag to dump -* @index: Index of the cacheline -* -* Returns The Octeon model specific tag structure. This is -* translated by a wrapper function to a generic form that is -* easier for applications to use. -*/ -static union __cvmx_l2c_tag __read_l2_tag (uint64_t assoc,uint64_t index) -{ - -uint64_t debug_tag_addr =CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , (index <<7 ) +96 ); -uint64_t core =cvmx_get_core_num (); -union __cvmx_l2c_tag tag_val; -uint64_t dbg_addr =CVMX_L2C_DBG ; -unsigned long flags; - -union cvmx_l2c_dbg debug_val; - debug_val.u64 =0 ; -/* -* For low core count parts, the core number is always small -* enough to stay in the correct field and not set any -* reserved bits. -*/ - debug_val.s.ppnum = core; - debug_val.s.l2t =1 ; - debug_val.s.set = assoc; - -local_irq_save (flags); -/* -* Make sure core is quiet (no prefetches, etc.) before -* entering debug mode. -*/ -CVMX_SYNC ; -/* Flush L1 to make sure debug load misses L1 */ -CVMX_DCACHE_INVALIDATE ; - -/* -* The following must be done in assembly as when in debug -* mode all data loads from L2 return special debug data, not -* normal memory contents. Also, interrupts must be disabled, -* since if an interrupt occurs while in debug mode the ISR -* will get debug data from all its memory * reads instead of -* the contents of memory. -*/ - - asmvolatile ( -".set push\n\t" -".set mips64\n\t" -".set noreorder\n\t" -"sd %[dbg_val], 0(%[dbg_addr])\n\t" /* Enter debug mode, wait for store */ -"ld $0, 0(%[dbg_addr])\n\t" -"ld %[tag_val], 0(%[tag_addr])\n\t" /* Read L2C tag data */ -"sd $0, 0(%[dbg_addr])\n\t" /* Exit debug mode, wait for store */ -"ld $0, 0(%[dbg_addr])\n\t" -"cache 9, 0($0)\n\t" /* Invalidate dcache to discard debug data */ -".set pop" - : [tag_val]"=r" (tag_val) - : [dbg_addr]"r" (dbg_addr), [dbg_val]"r" (debug_val), [tag_addr]"r" (debug_tag_addr) - :"memory" ); - -local_irq_restore (flags); - -return tag_val; -} - - -union cvmx_l2c_tag cvmx_l2c_get_tag (uint32_t association,uint32_t index) -{ -union cvmx_l2c_tag tag; - tag.u64 =0 ; - -if ((int )association >=cvmx_l2c_get_num_assoc ()) { -cvmx_dprintf ("ERROR: cvmx_l2c_get_tag association out of range\n" ); -return tag; - } -if ((int )index >=cvmx_l2c_get_num_sets ()) { -cvmx_dprintf ("ERROR: cvmx_l2c_get_tag index out of range (arg: %d, max: %d)\n" , - (int )index,cvmx_l2c_get_num_sets ()); -return tag; - } -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -union cvmx_l2c_tadx_tag l2c_tadx_tag; -uint64_t address =CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , - (association <<CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) | - (index <<CVMX_L2C_IDX_ADDR_SHIFT )); -/* -* Use L2 cache Index load tag cache instruction, as -* hardware loads the virtual tag for the L2 cache -* block with the contents of L2C_TAD0_TAG -* register. -*/ -CVMX_CACHE_LTGL2I (address,0 ); -CVMX_SYNC ;/* make sure CVMX_L2C_TADX_TAG is updated */ - l2c_tadx_tag.u64 =cvmx_read_csr (CVMX_L2C_TADX_TAG (0 )); - - tag.s.V = l2c_tadx_tag.s.valid; - tag.s.D = l2c_tadx_tag.s.dirty; - tag.s.L = l2c_tadx_tag.s.lock; - tag.s.U = l2c_tadx_tag.s.use; - tag.s.addr = l2c_tadx_tag.s.tag; - }else { -union __cvmx_l2c_tag tmp_tag; -/* __read_l2_tag is intended for internal use only */ - tmp_tag =__read_l2_tag (association, index); - -/* -* Convert all tag structure types to generic version, -* as it can represent all models. -*/ -if (OCTEON_IS_MODEL (OCTEON_CN58XX ) ||OCTEON_IS_MODEL (OCTEON_CN56XX )) { - tag.s.V = tmp_tag.cn58xx.V; - tag.s.D = tmp_tag.cn58xx.D; - tag.s.L = tmp_tag.cn58xx.L; - tag.s.U = tmp_tag.cn58xx.U; - tag.s.addr = tmp_tag.cn58xx.addr; - }else if (OCTEON_IS_MODEL (OCTEON_CN38XX )) { - tag.s.V = tmp_tag.cn38xx.V; - tag.s.D = tmp_tag.cn38xx.D; - tag.s.L = tmp_tag.cn38xx.L; - tag.s.U = tmp_tag.cn38xx.U; - tag.s.addr = tmp_tag.cn38xx.addr; - }else if (OCTEON_IS_MODEL (OCTEON_CN31XX ) ||OCTEON_IS_MODEL (OCTEON_CN52XX )) { - tag.s.V = tmp_tag.cn31xx.V; - tag.s.D = tmp_tag.cn31xx.D; - tag.s.L = tmp_tag.cn31xx.L; - tag.s.U = tmp_tag.cn31xx.U; - tag.s.addr = tmp_tag.cn31xx.addr; - }else if (OCTEON_IS_MODEL (OCTEON_CN30XX )) { - tag.s.V = tmp_tag.cn30xx.V; - tag.s.D = tmp_tag.cn30xx.D; - tag.s.L = tmp_tag.cn30xx.L; - tag.s.U = tmp_tag.cn30xx.U; - tag.s.addr = tmp_tag.cn30xx.addr; - }else if (OCTEON_IS_MODEL (OCTEON_CN50XX )) { - tag.s.V = tmp_tag.cn50xx.V; - tag.s.D = tmp_tag.cn50xx.D; - tag.s.L = tmp_tag.cn50xx.L; - tag.s.U = tmp_tag.cn50xx.U; - tag.s.addr = tmp_tag.cn50xx.addr; - }else { -cvmx_dprintf ("Unsupported OCTEON Model in %s\n" , __func__); - } - } -return tag; -} - -uint32_t cvmx_l2c_address_to_index (uint64_t addr) -{ -uint64_t idx = addr >>CVMX_L2C_IDX_ADDR_SHIFT ; -int indxalias =0 ; - -if (OCTEON_IS_MODEL (OCTEON_CN6XXX )) { -union cvmx_l2c_ctl l2c_ctl; - l2c_ctl.u64 =cvmx_read_csr (CVMX_L2C_CTL ); - indxalias = !l2c_ctl.s.disidxalias; - }else { -union cvmx_l2c_cfg l2c_cfg; - l2c_cfg.u64 =cvmx_read_csr (CVMX_L2C_CFG ); - indxalias = l2c_cfg.s.idxalias; - } - -if (indxalias) { -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -uint32_t a_14_12 = (idx / (CVMX_L2C_MEMBANK_SELECT_SIZE /(1 <<CVMX_L2C_IDX_ADDR_SHIFT ))) &0x7 ; - idx ^= idx /cvmx_l2c_get_num_sets (); - idx ^= a_14_12; - }else { - idx ^= ((addr &CVMX_L2C_ALIAS_MASK ) >>CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ); - } - } - idx &=CVMX_L2C_IDX_MASK ; -return idx; -} - -int cvmx_l2c_get_cache_size_bytes (void ) -{ -return cvmx_l2c_get_num_sets () *cvmx_l2c_get_num_assoc () * -CVMX_CACHE_LINE_SIZE ; -} - -/** -* Return log base 2 of the number of sets in the L2 cache -* Returns -*/ -int cvmx_l2c_get_set_bits (void ) -{ -int l2_set_bits; -if (OCTEON_IS_MODEL (OCTEON_CN56XX ) ||OCTEON_IS_MODEL (OCTEON_CN58XX )) - l2_set_bits =11 ;/* 2048 sets */ -else if (OCTEON_IS_MODEL (OCTEON_CN38XX ) ||OCTEON_IS_MODEL (OCTEON_CN63XX )) - l2_set_bits =10 ;/* 1024 sets */ -else if (OCTEON_IS_MODEL (OCTEON_CN31XX ) ||OCTEON_IS_MODEL (OCTEON_CN52XX )) - l2_set_bits =9 ;/* 512 sets */ -else if (OCTEON_IS_MODEL (OCTEON_CN30XX )) - l2_set_bits =8 ;/* 256 sets */ -else if (OCTEON_IS_MODEL (OCTEON_CN50XX )) - l2_set_bits =7 ;/* 128 sets */ -else { -cvmx_dprintf ("Unsupported OCTEON Model in %s\n" , __func__); - l2_set_bits =11 ;/* 2048 sets */ - } -return l2_set_bits; -} - -/* Return the number of sets in the L2 Cache */ -int cvmx_l2c_get_num_sets (void ) -{ -return 1 <<cvmx_l2c_get_set_bits (); -} - -/* Return the number of associations in the L2 Cache */ -int cvmx_l2c_get_num_assoc (void ) -{ -int l2_assoc; -if (OCTEON_IS_MODEL (OCTEON_CN56XX ) || -OCTEON_IS_MODEL (OCTEON_CN52XX ) || -OCTEON_IS_MODEL (OCTEON_CN58XX ) || -OCTEON_IS_MODEL (OCTEON_CN50XX ) || -OCTEON_IS_MODEL (OCTEON_CN38XX )) - l2_assoc =8 ; -else if (OCTEON_IS_MODEL (OCTEON_CN63XX )) - l2_assoc =16 ; -else if (OCTEON_IS_MODEL (OCTEON_CN31XX ) || -OCTEON_IS_MODEL (OCTEON_CN30XX )) - l2_assoc =4 ; -else { -cvmx_dprintf ("Unsupported OCTEON Model in %s\n" , __func__); - l2_assoc =8 ; - } - -/* Check to see if part of the cache is disabled */ -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -union cvmx_mio_fus_dat3 mio_fus_dat3; - - mio_fus_dat3.u64 =cvmx_read_csr (CVMX_MIO_FUS_DAT3 ); -/* -* cvmx_mio_fus_dat3.s.l2c_crip fuses map as follows -* <2> will be not used for 63xx -* <1> disables 1/2 ways -* <0> disables 1/4 ways -* They are cumulative, so for 63xx: -* <1> <0> -* 0 0 16-way 2MB cache -* 0 1 12-way 1.5MB cache -* 1 0 8-way 1MB cache -* 1 1 4-way 512KB cache -*/ - -if (mio_fus_dat3.s.l2c_crip ==3 ) - l2_assoc =4 ; -else if (mio_fus_dat3.s.l2c_crip ==2 ) - l2_assoc =8 ; -else if (mio_fus_dat3.s.l2c_crip ==1 ) - l2_assoc =12 ; - }else { -union cvmx_l2d_fus3 val; - val.u64 =cvmx_read_csr (CVMX_L2D_FUS3 ); -/* -* Using shifts here, as bit position names are -* different for each model but they all mean the -* same. -*/ -if ((val.u64 >>35 ) &0x1 ) - l2_assoc = l2_assoc >>2 ; -else if ((val.u64 >>34 ) &0x1 ) - l2_assoc = l2_assoc >>1 ; - } -return l2_assoc; -} - -/** -* Flush a line from the L2 cache -* This should only be called from one core at a time, as this routine -* sets the core to the 'debug' core in order to flush the line. -* -* @assoc: Association (or way) to flush -* @index: Index to flush -*/ -void cvmx_l2c_flush_line (uint32_t assoc,uint32_t index) -{ -/* Check the range of the index. */ -if (index > (uint32_t )cvmx_l2c_get_num_sets ()) { -cvmx_dprintf ("ERROR: cvmx_l2c_flush_line index out of range.\n" ); -return ; - } - -/* Check the range of association. */ -if (assoc > (uint32_t )cvmx_l2c_get_num_assoc ()) { -cvmx_dprintf ("ERROR: cvmx_l2c_flush_line association out of range.\n" ); -return ; - } - -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -uint64_t address; -/* Create the address based on index and association. -* Bits<20:17> select the way of the cache block involved in -* the operation -* Bits<16:7> of the effect address select the index -*/ - address =CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , - (assoc <<CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) | - (index <<CVMX_L2C_IDX_ADDR_SHIFT )); -CVMX_CACHE_WBIL2I (address,0 ); - }else { -union cvmx_l2c_dbg l2cdbg; - - l2cdbg.u64 =0 ; -if (!OCTEON_IS_MODEL (OCTEON_CN30XX )) - l2cdbg.s.ppnum =cvmx_get_core_num (); - l2cdbg.s.finv =1 ; - - l2cdbg.s.set = assoc; -cvmx_spinlock_lock (&cvmx_l2c_spinlock); -/* -* Enter debug mode, and make sure all other writes -* complete before we enter debug mode -*/ -CVMX_SYNC ; -cvmx_write_csr (CVMX_L2C_DBG , l2cdbg.u64); -cvmx_read_csr (CVMX_L2C_DBG ); - -CVMX_PREPARE_FOR_STORE (CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , - index *CVMX_CACHE_LINE_SIZE ), -0 ); -/* Exit debug mode */ -CVMX_SYNC ; -cvmx_write_csr (CVMX_L2C_DBG ,0 ); -cvmx_read_csr (CVMX_L2C_DBG ); -cvmx_spinlock_unlock (&cvmx_l2c_spinlock); - } -}arch/unicore32/include/asm/byteorder.h deleted +0
-24@@ -1,24 +0,0 @@ -/* -* linux/arch/unicore32/include/asm/byteorder.h -* -* Code specific to PKUnity SoC and UniCore ISA -* -* Copyright (C) 2001-2010 GUAN Xue-tao -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* UniCore ONLY support Little Endian mode, the data bus is connected such -* that byte accesses appear as: -* 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31 -* and word accesses (data or instruction) appear as: -* d0...d31 -*/ -#ifndef __UNICORE_BYTEORDER_H__ -#define __UNICORE_BYTEORDER_H__ - -#include <linux/byteorder/little_endian.h> - -#endif -arch/unicore32/include/asm/kvm_para.h deleted +0
-1@@ -1 +0,0 @@ -#include <asm-generic/kvm_para.h> arch/unicore32/include/asm/sigcontext.h deleted +0
-29@@ -1,29 +0,0 @@ -/* -* linux/arch/unicore32/include/asm/sigcontext.h -* -* Code specific to PKUnity SoC and UniCore ISA -* -* Copyright (C) 2001-2010 GUAN Xue-tao -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ -#ifndef __UNICORE_SIGCONTEXT_H__ -#define __UNICORE_SIGCONTEXT_H__ - -#include <asm/ptrace.h> -/* -* Signal context structure - contains all info to do with the state -* before the signal handler was invoked. Note: only add new entries -* to the end of the structure. -*/ -struct sigcontext { -unsigned long trap_no; -unsigned long error_code; -unsigned long oldmask; -unsigned long fault_address; -struct pt_regs regs; -}; - -#endif arch/unicore32/include/asm/unistd.h deleted +0
-14@@ -1,14 +0,0 @@ -/* -* linux/arch/unicore32/include/asm/unistd.h -* -* Code specific to PKUnity SoC and UniCore ISA -* -* Copyright (C) 2001-2010 GUAN Xue-tao -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -/* Use the standard ABI for syscalls. */ -#include <asm-generic/unistd.h> arch/x86/kvm/x86.c +6
-0@@ -5938,6 +5938,12 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,return 0 ; } +int kvm_arch_vcpu_ioctl_set_entitlement (struct kvm_vcpu *vcpu,long entitlement) +{ + vcpu->arch.consigned_limit = entitlement; +return 0 ; +} +int kvm_arch_vcpu_ioctl_get_fpu (struct kvm_vcpu *vcpu,struct kvm_fpu *fpu) { struct i387_fxsave_struct *fxsave =include/linux/kvm_host.h +2
-0@@ -590,6 +590,8 @@ void kvm_arch_hardware_unsetup(void);void kvm_arch_check_processor_compat (void *rtn);int kvm_arch_vcpu_runnable (struct kvm_vcpu *vcpu);int kvm_arch_vcpu_should_kick (struct kvm_vcpu *vcpu); +int kvm_arch_vcpu_ioctl_set_entitlement (struct kvm_vcpu *vcpu, +long entitlement);void kvm_free_physmem (struct kvm *kvm);include/linux/raid/md_p.h deleted +0
-301@@ -1,301 +0,0 @@ -/* -md_p.h : physical layout of Linux RAID devices -Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman -- This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. -- You should have received a copy of the GNU General Public License -(for example /usr/src/linux/COPYING); if not, write to the Free -Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef _MD_P_H -#define _MD_P_H - -#include <linux/types.h> - -/* -* RAID superblock. -* -* The RAID superblock maintains some statistics on each RAID configuration. -* Each real device in the RAID set contains it near the end of the device. -* Some of the ideas are copied from the ext2fs implementation. -* -* We currently use 4096 bytes as follows: -* -* word offset function -* -* 0 - 31 Constant generic RAID device information. -* 32 - 63 Generic state information. -* 64 - 127 Personality specific information. -* 128 - 511 12 32-words descriptors of the disks in the raid set. -* 512 - 911 Reserved. -* 912 - 1023 Disk specific descriptor. -*/ - -/* -* If x is the real device size in bytes, we return an apparent size of: -* -* y = (x & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES -* -* and place the 4kB superblock at offset y. -*/ -#define MD_RESERVED_BYTES (64 * 1024) -#define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512) - -#define MD_NEW_SIZE_SECTORS (x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS) - -#define MD_SB_BYTES 4096 -#define MD_SB_WORDS (MD_SB_BYTES / 4) -#define MD_SB_SECTORS (MD_SB_BYTES / 512) - -/* -* The following are counted in 32-bit words -*/ -#define MD_SB_GENERIC_OFFSET 0 -#define MD_SB_PERSONALITY_OFFSET 64 -#define MD_SB_DISKS_OFFSET 128 -#define MD_SB_DESCRIPTOR_OFFSET 992 - -#define MD_SB_GENERIC_CONSTANT_WORDS 32 -#define MD_SB_GENERIC_STATE_WORDS 32 -#define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS) -#define MD_SB_PERSONALITY_WORDS 64 -#define MD_SB_DESCRIPTOR_WORDS 32 -#define MD_SB_DISKS 27 -#define MD_SB_DISKS_WORDS (MD_SB_DISKS*MD_SB_DESCRIPTOR_WORDS) -#define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS) -#define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS) - -/* -* Device "operational" state bits -*/ -#define MD_DISK_FAULTY 0/* disk is faulty / operational */ -#define MD_DISK_ACTIVE 1/* disk is running or spare disk */ -#define MD_DISK_SYNC 2/* disk is in sync with the raid set */ -#define MD_DISK_REMOVED 3/* disk is in sync with the raid set */ - -#define MD_DISK_WRITEMOSTLY 9/* disk is "write-mostly" is RAID1 config. -* read requests will only be sent here in -* dire need -*/ - -typedef struct mdp_device_descriptor_s { -__u32 number;/* 0 Device number in the entire set */ -__u32 major;/* 1 Device major number */ -__u32 minor;/* 2 Device minor number */ -__u32 raid_disk;/* 3 The role of the device in the raid set */ -__u32 state;/* 4 Operational state */ -__u32 reserved[MD_SB_DESCRIPTOR_WORDS -5 ]; -}mdp_disk_t ; - -#define MD_SB_MAGIC 0xa92b4efc - -/* -* Superblock state bits -*/ -#define MD_SB_CLEAN 0 -#define MD_SB_ERRORS 1 - -#define MD_SB_BITMAP_PRESENT 8/* bitmap may be present nearby */ - -/* -* Notes: -* - if an array is being reshaped (restriped) in order to change the -* the number of active devices in the array, 'raid_disks' will be -* the larger of the old and new numbers. 'delta_disks' will -* be the "new - old". So if +ve, raid_disks is the new value, and -* "raid_disks-delta_disks" is the old. If -ve, raid_disks is the -* old value and "raid_disks+delta_disks" is the new (smaller) value. -*/ - - -typedef struct mdp_superblock_s { -/* -* Constant generic information -*/ -__u32 md_magic;/* 0 MD identifier */ -__u32 major_version;/* 1 major version to which the set conforms */ -__u32 minor_version;/* 2 minor version ... */ -__u32 patch_version;/* 3 patchlevel version ... */ -__u32 gvalid_words;/* 4 Number of used words in this section */ -__u32 set_uuid0;/* 5 Raid set identifier */ -__u32 ctime;/* 6 Creation time */ -__u32 level;/* 7 Raid personality */ -__u32 size;/* 8 Apparent size of each individual disk */ -__u32 nr_disks;/* 9 total disks in the raid set */ -__u32 raid_disks;/* 10 disks in a fully functional raid set */ -__u32 md_minor;/* 11 preferred MD minor device number */ -__u32 not_persistent;/* 12 does it have a persistent superblock */ -__u32 set_uuid1;/* 13 Raid set identifier #2 */ -__u32 set_uuid2;/* 14 Raid set identifier #3 */ -__u32 set_uuid3;/* 15 Raid set identifier #4 */ -__u32 gstate_creserved[MD_SB_GENERIC_CONSTANT_WORDS -16 ]; - -/* -* Generic state information -*/ -__u32 utime;/* 0 Superblock update time */ -__u32 state;/* 1 State bits (clean, ...) */ -__u32 active_disks;/* 2 Number of currently active disks */ -__u32 working_disks;/* 3 Number of working disks */ -__u32 failed_disks;/* 4 Number of failed disks */ -__u32 spare_disks;/* 5 Number of spare disks */ -__u32 sb_csum;/* 6 checksum of the whole superblock */ -#ifdef __BIG_ENDIAN -__u32 events_hi;/* 7 high-order of superblock update count */ -__u32 events_lo;/* 8 low-order of superblock update count */ -__u32 cp_events_hi;/* 9 high-order of checkpoint update count */ -__u32 cp_events_lo;/* 10 low-order of checkpoint update count */ -#else -__u32 events_lo;/* 7 low-order of superblock update count */ -__u32 events_hi;/* 8 high-order of superblock update count */ -__u32 cp_events_lo;/* 9 low-order of checkpoint update count */ -__u32 cp_events_hi;/* 10 high-order of checkpoint update count */ -#endif -__u32 recovery_cp;/* 11 recovery checkpoint sector count */ -/* There are only valid for minor_version > 90 */ -__u64 reshape_position;/* 12,13 next address in array-space for reshape */ -__u32 new_level;/* 14 new level we are reshaping to */ -__u32 delta_disks;/* 15 change in number of raid_disks */ -__u32 new_layout;/* 16 new layout */ -__u32 new_chunk;/* 17 new chunk size (bytes) */ -__u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS -18 ]; - -/* -* Personality information -*/ -__u32 layout;/* 0 the array's physical layout */ -__u32 chunk_size;/* 1 chunk size in bytes */ -__u32 root_pv;/* 2 LV root PV */ -__u32 root_block;/* 3 LV root block */ -__u32 pstate_reserved[MD_SB_PERSONALITY_WORDS -4 ]; - -/* -* Disks information -*/ -mdp_disk_t disks[MD_SB_DISKS ]; - -/* -* Reserved -*/ -__u32 reserved[MD_SB_RESERVED_WORDS ]; - -/* -* Active descriptor -*/ -mdp_disk_t this_disk; - -}mdp_super_t ; - -static inline __u64 md_event (mdp_super_t *sb) { -__u64 ev = sb->events_hi; -return (ev<<32 )| sb->events_lo; -} - -#define MD_SUPERBLOCK_1_TIME_SEC_MASK ((1ULL<<40) - 1) - -/* -* The version-1 superblock : -* All numeric fields are little-endian. -* -* total size: 256 bytes plus 2 per device. -* 1K allows 384 devices. -*/ -struct mdp_superblock_1 { -/* constant array information - 128 bytes */ -__le32 magic;/* MD_SB_MAGIC: 0xa92b4efc - little endian */ -__le32 major_version;/* 1 */ -__le32 feature_map;/* bit 0 set if 'bitmap_offset' is meaningful */ -__le32 pad0;/* always set to 0 when writing */ - -__u8 set_uuid[16 ];/* user-space generated. */ -char set_name[32 ];/* set and interpreted by user-space */ - -__le64 ctime;/* lo 40 bits are seconds, top 24 are microseconds or 0*/ -__le32 level;/* -4 (multipath), -1 (linear), 0,1,4,5 */ -__le32 layout;/* only for raid5 and raid10 currently */ -__le64 size;/* used size of component devices, in 512byte sectors */ - -__le32 chunksize;/* in 512byte sectors */ -__le32 raid_disks; -__le32 bitmap_offset;/* sectors after start of superblock that bitmap starts -* NOTE: signed, so bitmap can be before superblock -* only meaningful of feature_map[0] is set. -*/ - -/* These are only valid with feature bit '4' */ -__le32 new_level;/* new level we are reshaping to */ -__le64 reshape_position;/* next address in array-space for reshape */ -__le32 delta_disks;/* change in number of raid_disks */ -__le32 new_layout;/* new layout */ -__le32 new_chunk;/* new chunk size (512byte sectors) */ -__le32 new_offset;/* signed number to add to data_offset in new -* layout. 0 == no-change. This can be -* different on each device in the array. -*/ - -/* constant this-device information - 64 bytes */ -__le64 data_offset;/* sector start of data, often 0 */ -__le64 data_size;/* sectors in this device that can be used for data */ -__le64 super_offset;/* sector start of this superblock */ -__le64 recovery_offset;/* sectors before this offset (from data_offset) have been recovered */ -__le32 dev_number;/* permanent identifier of this device - not role in raid */ -__le32 cnt_corrected_read;/* number of read errors that were corrected by re-writing */ -__u8 device_uuid[16 ];/* user-space setable, ignored by kernel */ -__u8 devflags;/* per-device flags. Only one defined...*/ -#define WriteMostly1 1/* mask for writemostly flag in above */ -/* Bad block log. If there are any bad blocks the feature flag is set. -* If offset and size are non-zero, that space is reserved and available -*/ -__u8 bblog_shift;/* shift from sectors to block size */ -__le16 bblog_size;/* number of sectors reserved for list */ -__le32 bblog_offset;/* sector offset from superblock to bblog, -* signed - not unsigned */ - -/* array state information - 64 bytes */ -__le64 utime;/* 40 bits second, 24 bits microseconds */ -__le64 events;/* incremented when superblock updated */ -__le64 resync_offset;/* data before this offset (from data_offset) known to be in sync */ -__le32 sb_csum;/* checksum up to devs[max_dev] */ -__le32 max_dev;/* size of devs[] array to consider */ -__u8 pad3[64 -32 ];/* set to 0 when writing */ - -/* device state information. Indexed by dev_number. -* 2 bytes per device -* Note there are no per-device state flags. State information is rolled -* into the 'roles' value. If a device is spare or faulty, then it doesn't -* have a meaningful role. -*/ -__le16 dev_roles[0 ];/* role in array, or 0xffff for a spare, or 0xfffe for faulty */ -}; - -/* feature_map bits */ -#define MD_FEATURE_BITMAP_OFFSET 1 -#define MD_FEATURE_RECOVERY_OFFSET 2/* recovery_offset is present and -* must be honoured -*/ -#define MD_FEATURE_RESHAPE_ACTIVE 4 -#define MD_FEATURE_BAD_BLOCKS 8/* badblock list is not empty */ -#define MD_FEATURE_REPLACEMENT 16/* This device is replacing an -* active device with same 'role'. -* 'recovery_offset' is also set. -*/ -#define MD_FEATURE_RESHAPE_BACKWARDS 32/* Reshape doesn't change number -* of devices, but is going -* backwards anyway. -*/ -#define MD_FEATURE_NEW_OFFSET 64/* new_offset must be honoured */ -#define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ - |MD_FEATURE_RECOVERY_OFFSET \ - |MD_FEATURE_RESHAPE_ACTIVE \ - |MD_FEATURE_BAD_BLOCKS \ - |MD_FEATURE_REPLACEMENT \ - |MD_FEATURE_RESHAPE_BACKWARDS \ - |MD_FEATURE_NEW_OFFSET \ - ) - -#endif include/uapi/linux/kvm.h +2
-0@@ -921,6 +921,8 @@ struct kvm_s390_ucas_mapping {#define KVM_SET_ONE_REG _IOW(KVMIO, 0xac, struct kvm_one_reg)/* VM is being stopped by host */ #define KVM_KVMCLOCK_CTRL _IO(KVMIO, 0xad) +/* Set the consignment limit which will be used to separete steal time */ +#define KVM_SET_ENTITLEMENT _IOW(KVMIO, 0xae, unsigned long)#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)tools/perf/builtin-test.c deleted +0
-1559@@ -1,1559 +0,0 @@ -/* -* builtin-test.c -* -* Builtin regression testing command: ever growing number of sanity tests -*/ -#include "builtin.h" - -#include "util/cache.h" -#include "util/color.h" -#include "util/debug.h" -#include "util/debugfs.h" -#include "util/evlist.h" -#include "util/parse-options.h" -#include "util/parse-events.h" -#include "util/symbol.h" -#include "util/thread_map.h" -#include "util/pmu.h" -#include "event-parse.h" -#include "../../include/linux/hw_breakpoint.h" - -#include <sys/mman.h> - -static int vmlinux_matches_kallsyms_filter (struct map *map__maybe_unused , -struct symbol *sym) -{ -bool *visited =symbol__priv (sym); - *visited = true; -return 0 ; -} - -static int test__vmlinux_matches_kallsyms (void ) -{ -int err =-1 ; -struct rb_node *nd; -struct symbol *sym; -struct map *kallsyms_map, *vmlinux_map; -struct machine kallsyms, vmlinux; -enum map_type type =MAP__FUNCTION ; -struct ref_reloc_sym ref_reloc_sym = { .name ="_stext" , }; - -/* -* Step 1: -* -* Init the machines that will hold kernel, modules obtained from -* both vmlinux + .ko files and from /proc/kallsyms split by modules. -*/ -machine__init (&kallsyms,"" ,HOST_KERNEL_ID ); -machine__init (&vmlinux,"" ,HOST_KERNEL_ID ); - -/* -* Step 2: -* -* Create the kernel maps for kallsyms and the DSO where we will then -* load /proc/kallsyms. Also create the modules maps from /proc/modules -* and find the .ko files that match them in /lib/modules/`uname -r`/. -*/ -if (machine__create_kernel_maps (&kallsyms) <0 ) { -pr_debug ("machine__create_kernel_maps " ); -return -1 ; - } - -/* -* Step 3: -* -* Load and split /proc/kallsyms into multiple maps, one per module. -*/ -if (machine__load_kallsyms (&kallsyms,"/proc/kallsyms" , type,NULL ) <=0 ) { -pr_debug ("dso__load_kallsyms " ); - goto out; - } - -/* -* Step 4: -* -* kallsyms will be internally on demand sorted by name so that we can -* find the reference relocation * symbol, i.e. the symbol we will use -* to see if the running kernel was relocated by checking if it has the -* same value in the vmlinux file we load. -*/ - kallsyms_map =machine__kernel_map (&kallsyms, type); - - sym =map__find_symbol_by_name (kallsyms_map, ref_reloc_sym.name,NULL ); -if (sym ==NULL ) { -pr_debug ("dso__find_symbol_by_name " ); - goto out; - } - - ref_reloc_sym.addr = sym->start; - -/* -* Step 5: -* -* Now repeat step 2, this time for the vmlinux file we'll auto-locate. -*/ -if (machine__create_kernel_maps (&vmlinux) <0 ) { -pr_debug ("machine__create_kernel_maps " ); - goto out; - } - - vmlinux_map =machine__kernel_map (&vmlinux, type); -map__kmap (vmlinux_map)->ref_reloc_sym = &ref_reloc_sym; - -/* -* Step 6: -* -* Locate a vmlinux file in the vmlinux path that has a buildid that -* matches the one of the running kernel. -* -* While doing that look if we find the ref reloc symbol, if we find it -* we'll have its ref_reloc_symbol.unrelocated_addr and then -* maps__reloc_vmlinux will notice and set proper ->[un]map_ip routines -* to fixup the symbols. -*/ -if (machine__load_vmlinux_path (&vmlinux, type, - vmlinux_matches_kallsyms_filter) <=0 ) { -pr_debug ("machine__load_vmlinux_path " ); - goto out; - } - - err =0 ; -/* -* Step 7: -* -* Now look at the symbols in the vmlinux DSO and check if we find all of them -* in the kallsyms dso. For the ones that are in both, check its names and -* end addresses too. -*/ -for (nd =rb_first (&vmlinux_map->dso->symbols[type]); nd; nd =rb_next (nd)) { -struct symbol *pair, *first_pair; -bool backwards = true; - - sym = rb_entry(nd, struct symbol, rb_node); - -if (sym->start == sym->end) -continue ; - - first_pair =machine__find_kernel_symbol (&kallsyms, type, sym->start,NULL ,NULL ); - pair = first_pair; - -if (pair && pair->start == sym->start) { -next_pair: -if (strcmp (sym->name, pair->name) ==0 ) { -/* -* kallsyms don't have the symbol end, so we -* set that by using the next symbol start - 1, -* in some cases we get this up to a page -* wrong, trace_kmalloc when I was developing -* this code was one such example, 2106 bytes -* off the real size. More than that and we -* _really_ have a problem. -*/ -s64 skew = sym->end - pair->end; -if (llabs (skew) < page_size) -continue ; - -pr_debug ("%#" PRIx64": diff end addr for %s v: %#" PRIx64" k: %#" PRIx64"\n" , - sym->start, sym->name, sym->end, pair->end); - }else { -struct rb_node *nnd; -detour: - nnd = backwards ?rb_prev (&pair->rb_node) : -rb_next (&pair->rb_node); -if (nnd) { - struct symbol *next = rb_entry(nnd, struct symbol, rb_node); - -if (next->start == sym->start) { - pair = next; - goto next_pair; - } - } - -if (backwards) { - backwards = false; - pair = first_pair; - goto detour; - } - -pr_debug ("%#" PRIx64": diff name v: %s k: %s\n" , - sym->start, sym->name, pair->name); - } - }else -pr_debug ("%#" PRIx64": %s not on kallsyms\n" , sym->start, sym->name); - - err =-1 ; - } - -if (!verbose) - goto out; - -pr_info ("Maps only in vmlinux:\n" ); - -for (nd =rb_first (&vmlinux.kmaps.maps[type]); nd; nd =rb_next (nd)) { - struct map *pos = rb_entry(nd, struct map, rb_node), *pair; -/* -* If it is the kernel, kallsyms is always "[kernel.kallsyms]", while -* the kernel will have the path for the vmlinux file being used, -* so use the short name, less descriptive but the same ("[kernel]" in -* both cases. -*/ - pair =map_groups__find_by_name (&kallsyms.kmaps, type, - (pos->dso->kernel ? - pos->dso->short_name : - pos->dso->name)); -if (pair) - pair->priv =1 ; -else -map__fprintf (pos, stderr); - } - -pr_info ("Maps in vmlinux with a different name in kallsyms:\n" ); - -for (nd =rb_first (&vmlinux.kmaps.maps[type]); nd; nd =rb_next (nd)) { - struct map *pos = rb_entry(nd, struct map, rb_node), *pair; - - pair =map_groups__find (&kallsyms.kmaps, type, pos->start); -if (pair ==NULL || pair->priv) -continue ; - -if (pair->start == pos->start) { - pair->priv =1 ; -pr_info (" %" PRIx64"-%" PRIx64" %" PRIx64" %s in kallsyms as" , - pos->start, pos->end, pos->pgoff, pos->dso->name); -if (pos->pgoff != pair->pgoff || pos->end != pair->end) -pr_info (": \n*%" PRIx64"-%" PRIx64" %" PRIx64"" , - pair->start, pair->end, pair->pgoff); -pr_info (" %s\n" , pair->dso->name); - pair->priv =1 ; - } - } - -pr_info ("Maps only in kallsyms:\n" ); - -for (nd =rb_first (&kallsyms.kmaps.maps[type]); - nd; nd =rb_next (nd)) { - struct map *pos = rb_entry(nd, struct map, rb_node); - -if (!pos->priv) -map__fprintf (pos, stderr); - } -out: -return err; -} - -#include "util/cpumap.h" -#include "util/evsel.h" -#include <sys/types.h> - -static int trace_event__id (const char *evname) -{ -char *filename; -int err =-1 , fd; - - if (asprintf(&filename, - "%s/syscalls/%s/id",Lines of this file are not shown. View the raw message.
tools/perf/util/dso-test-data.c deleted +0
-153Lines of this file are not shown. View the raw message.
tools/perf/util/parse-events-test.c deleted +0
-1116Lines of this file are not shown. View the raw message.
tools/testing/selftests/epoll/Makefile deleted +0
-11Lines of this file are not shown. View the raw message.
tools/testing/selftests/epoll/test_epoll.c deleted +0
-344Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
--
Gleb.
Part of the diff is not shown here. View the raw message.
Re: [PATCH 5/5] Add an ioctl to communicate the consign limit to the host.
Quoted 5 lines · Gleb Natapov
Quoted 3 lines · Michael Wolf
Add an ioctl to communicate the consign limit to the host.
Signed-off-by Michael Wolf <[email protected]>Something is very wrong with this patch.
Yep, something happened with the patch management tool I use. I will fix and resend.
Quoted 6,506 lines
virt/kvm/kvm_main.c
Quoted 6,503 lines
--- CREDITS | 5 Documentation/arm64/memory.txt | 12 Documentation/cgroups/memory.txt | 4 .../devicetree/bindings/net/mdio-gpio.txt | 9 Documentation/filesystems/proc.txt | 16 Documentation/hwmon/fam15h_power | 2 Documentation/kernel-parameters.txt | 20 Documentation/networking/netdev-features.txt | 2 Documentation/scheduler/numa-problem.txt | 20 MAINTAINERS | 87 + Makefile | 2 arch/alpha/kernel/osf_sys.c | 6 arch/arm/boot/Makefile | 10 arch/arm/boot/dts/tegra30.dtsi | 4 arch/arm/include/asm/io.h | 4 arch/arm/include/asm/sched_clock.h | 2 arch/arm/include/asm/vfpmacros.h | 12 arch/arm/include/uapi/asm/hwcap.h | 3 arch/arm/kernel/sched_clock.c | 18 arch/arm/mach-at91/at91rm9200_devices.c | 2 arch/arm/mach-at91/at91sam9260_devices.c | 2 arch/arm/mach-at91/at91sam9261_devices.c | 2 arch/arm/mach-at91/at91sam9263_devices.c | 2 arch/arm/mach-at91/at91sam9g45_devices.c | 12 arch/arm/mach-davinci/dm644x.c | 3 arch/arm/mach-highbank/system.c | 3 arch/arm/mach-imx/clk-gate2.c | 2 arch/arm/mach-imx/ehci-imx25.c | 2 arch/arm/mach-imx/ehci-imx35.c | 2 arch/arm/mach-omap2/board-igep0020.c | 5 arch/arm/mach-omap2/clockdomains44xx_data.c | 2 arch/arm/mach-omap2/devices.c | 79 + arch/arm/mach-omap2/omap_hwmod.c | 63 + arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 36 arch/arm/mach-omap2/twl-common.c | 3 arch/arm/mach-omap2/vc.c | 2 arch/arm/mach-pxa/hx4700.c | 8 arch/arm/mach-pxa/spitz_pm.c | 8 arch/arm/mm/alignment.c | 2 arch/arm/plat-omap/include/plat/omap_hwmod.h | 6 arch/arm/tools/Makefile | 2 arch/arm/vfp/vfpmodule.c | 9 arch/arm/xen/enlighten.c | 11 arch/arm/xen/hypercall.S | 14 arch/arm64/Kconfig | 1 arch/arm64/include/asm/elf.h | 5 arch/arm64/include/asm/fpsimd.h | 5 arch/arm64/include/asm/io.h | 10 arch/arm64/include/asm/pgtable-hwdef.h | 6 arch/arm64/include/asm/pgtable.h | 40 - arch/arm64/include/asm/processor.h | 2 arch/arm64/include/asm/unistd.h | 1 arch/arm64/kernel/perf_event.c | 10 arch/arm64/kernel/process.c | 18 arch/arm64/kernel/smp.c | 3 arch/arm64/mm/init.c | 2 arch/frv/Kconfig | 1 arch/frv/boot/Makefile | 10 arch/frv/include/asm/unistd.h | 1 arch/frv/kernel/entry.S | 28 arch/frv/kernel/process.c | 5 arch/frv/mb93090-mb00/pci-dma-nommu.c | 1 arch/h8300/include/asm/cache.h | 3 arch/ia64/mm/init.c | 1 arch/m68k/include/asm/signal.h | 6 arch/mips/cavium-octeon/executive/cvmx-l2c.c | 900 ------------ arch/unicore32/include/asm/byteorder.h | 24 arch/unicore32/include/asm/kvm_para.h | 1 arch/unicore32/include/asm/sigcontext.h | 29 arch/unicore32/include/asm/unistd.h | 14 arch/x86/kvm/x86.c | 6 include/linux/kvm_host.h | 2 include/linux/raid/md_p.h | 301 ---- include/uapi/linux/kvm.h | 2 tools/perf/builtin-test.c | 1559 -------------------- tools/perf/util/dso-test-data.c | 153 -- tools/perf/util/parse-events-test.c | 1116 -------------- tools/testing/selftests/epoll/Makefile | 11 tools/testing/selftests/epoll/test_epoll.c | 344 ---- virt/kvm/kvm_main.c | 7 80 files changed, 471 insertions(+), 4677 deletions(-)delete mode 100644
arch/mips/cavium-octeon/executive/cvmx-l2c.cdelete mode 100644arch/unicore32/include/asm/byteorder.hdelete mode 100644arch/unicore32/include/asm/kvm_para.hdelete mode 100644arch/unicore32/include/asm/sigcontext.hdelete mode 100644arch/unicore32/include/asm/unistd.hdelete mode 100644include/linux/raid/md_p.h
delete mode 100644tools/perf/builtin-test.c
delete mode 100644tools/perf/util/dso-test-data.cdelete mode 100644tools/perf/util/parse-events-test.cdelete mode 100644tools/testing/selftests/epoll/Makefiledelete mode 100644tools/testing/selftests/epoll/test_epoll.cCREDITS +5
-0@@ -1824,6 +1824,11 @@ S: Kattreinstr 38 S: D-64295 S: Germany +N: Avi Kivity +E: [email protected] +D: Kernel-based Virtual Machine (KVM) +S: Ra'annana, Israel + N: Andi Kleen E: [email protected] U: http://www.halobates.deDocumentation/arm64/memory.txt +6
-6@@ -27,17 +27,17 @@ Start End Size Use ----------------------------------------------------------------------- 0000000000000000 0000007fffffffff 512GB user -ffffff8000000000 ffffffbbfffcffff ~240GB vmalloc +ffffff8000000000 ffffffbbfffeffff ~240GB vmalloc -ffffffbbfffd0000 ffffffbcfffdffff 64KB [guard page] +ffffffbbffff0000 ffffffbbffffffff 64KB [guard page] -ffffffbbfffe0000 ffffffbcfffeffff 64KB PCI I/O space +ffffffbc00000000 ffffffbdffffffff 8GB vmemmap -ffffffbbffff0000 ffffffbcffffffff 64KB [guard page] +ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap] -ffffffbc00000000 ffffffbdffffffff 8GB vmemmap +ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space -ffffffbe00000000 ffffffbffbffffff ~8GB [guard, future vmmemap] +ffffffbbffff0000 ffffffbcffffffff ~2MB [guard] ffffffbffc000000 ffffffbfffffffff 64MB modulesDocumentation/cgroups/memory.txt +4
-0@@ -466,6 +466,10 @@ Note: 5.3 swappiness Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. +Please note that unlike the global swappiness, memcg knob set to 0 +really prevents from any swapping even if there is a swap storage +available. This might lead to memcg OOM killer if there are no file +pages to reclaim. Following cgroups' swappiness can't be changed. - root cgroup (uses /proc/sys/vm/swappiness).Documentation/devicetree/bindings/net/mdio-gpio.txt +8
-1@@ -8,9 +8,16 @@ gpios property as described in section VIII.1 in the following order: MDC, MDIO. +Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases" +node. + Example: -mdio { +aliases { + mdio-gpio0 = <&mdio0>; +}; + +mdio0: mdio { compatible = "virtual,mdio-gpio"; #address-cells = <1>; #size-cells = <0>;Documentation/filesystems/proc.txt +12
-4@@ -33,7 +33,7 @@ Table of Contents 2 Modifying System Parameters 3 Per-Process Parameters - 3.1 /proc/<pid>/oom_score_adj - Adjust the oom-killer + 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj - Adjust the oom-killer score 3.2 /proc/<pid>/oom_score - Display current oom-killer score 3.3 /proc/<pid>/io - Display the IO accounting fields@@ -1320,10 +1320,10 @@ of the kernel. CHAPTER 3: PER-PROCESS PARAMETERS ------------------------------------------------------------------------------ -3.1 /proc/<pid>/oom_score_adj- Adjust the oom-killer score +3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score -------------------------------------------------------------------------------- -This file can be used to adjust the badness heuristic used to select which +These file can be used to adjust the badness heuristic used to select which process gets killed in out of memory conditions. The badness heuristic assigns a value to each candidate task ranging from 0@@ -1361,6 +1361,12 @@ same system, cpuset, mempolicy, or memory controller resources to use at least equivalent to discounting 50% of the task's allowed memory from being considered as scoring against the task. +For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also +be used to tune the badness score. Its acceptable values range from -16 +(OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17 +(OOM_DISABLE) to disable oom killing entirely for that task. Its value is +scaled linearly with /proc/<pid>/oom_score_adj. + The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last value set by a CAP_SYS_RESOURCE process. To reduce the value any lower requires CAP_SYS_RESOURCE.@@ -1375,7 +1381,9 @@ minimal amount of work. ------------------------------------------------------------- This file can be used to check the current score used by the oom-killer is for -any given <pid>. +any given <pid>. Use it together with /proc/<pid>/oom_score_adj to tune which +process should be killed in an out-of-memory situation. + 3.3 /proc/<pid>/io - Display the IO accounting fields -------------------------------------------------------Documentation/hwmon/fam15h_power +1
-1@@ -10,7 +10,7 @@ Supported chips: BIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processors (not yet published) -Author: Andreas Herrmann <[email protected]> +Author: Andreas Herrmann <[email protected]> Description -----------Documentation/kernel-parameters.txt +20
-0@@ -1304,6 +1304,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. lapic [X86-32,APIC] Enable the local APIC even if BIOS disabled it. + lapic= [x86,APIC] "notscdeadline" Do not use TSC deadline + value for LAPIC timer one-shot implementation. Default + back to the programmable timer unit in the LAPIC. + lapic_timer_c2_ok [X86,APIC] trust the local apic timer in C2 power state.@@ -2859,6 +2863,22 @@ bytes respectively. Such letter suffixes can also be entirely omitted. to facilitate early boot debugging. See also Documentation/trace/events.txt + trace_options=[option-list] + [FTRACE] Enable or disable tracer options at boot. + The option-list is a comma delimited list of options + that can be enabled or disabled just as if you were + to echo the option name into + + /sys/kernel/debug/tracing/trace_options + + For example, to enable stacktrace option (to dump the + stack trace of each event), add to the command line: + + trace_options=stacktrace + + See also Documentation/trace/ftrace.txt "trace options" + section. + transparent_hugepage= [KNL] Format: [always|madvise|never]Documentation/networking/netdev-features.txt +1
-1@@ -164,4 +164,4 @@ read the CRC recorded by the NIC on receipt of the packet. This requests that the NIC receive all possible frames, including errored frames (such as bad FCS, etc). This can be helpful when sniffing a link with bad packets on it. Some NICs may receive more packets if also put into normal -PROMISC mdoe. +PROMISC mode.Documentation/scheduler/numa-problem.txt +13
-7@@ -133,6 +133,8 @@ XXX properties of this M vs a potential optimal 2b) migrate memory towards 'n_i' using 2 samples. +XXX include the statistical babble on double sampling somewhere near + This separates pages into those that will migrate and those that will not due to the two samples not matching. We could consider the first to be of 'p_i' (private) and the second to be of 's_i' (shared).@@ -142,7 +144,17 @@ This interpretation can be motivated by the previously observed property that 's_i' (shared). (here we loose the need for memory limits again, since it becomes indistinguishable from shared). -XXX include the statistical babble on double sampling somewhere near + 2c) use cpu samples instead of node samples + +The problem with sampling on node granularity is that one looses 's_i' for +the local node, since one cannot distinguish between two accesses from the +same node. + +By increasing the granularity to per-cpu we gain the ability to have both an +'s_i' and 'p_i' per node. Since we do all task placement per-cpu as well this +seems like a natural match. The line where we overcommit cpus is where we loose +granularity again, but when we loose overcommit we naturally spread tasks. +Therefore it should work out nicely. This reduces the problem further; we loose 'M' as per 2a, it further reduces the 'T_k,l' (interconnect traffic) term to only include shared (since per the@@ -150,12 +162,6 @@ above all private will be local): T_k,l = \Sum_i bs_i,l for every n_i = k, l != k -[ more or less matches the state of sched/numa and describes its remaining - problems and assumptions. It should work well for tasks without significant - shared memory usage between tasks. ] - -Possible future directions: - Motivated by the form of 'T_k,l', try and obtain each term of the sum, so we can evaluate it;MAINTAINERS +73
-14@@ -503,7 +503,7 @@ F: include/linux/altera_uart.h F: include/linux/altera_jtaguart.h AMD FAM15H PROCESSOR POWER MONITORING DRIVER -M: Andreas Herrmann <[email protected]> +M: Andreas Herrmann <[email protected]> L: [email protected] S: Maintained F: Documentation/hwmon/fam15h_power@@ -526,10 +526,10 @@ F: drivers/video/geode/ F: arch/x86/include/asm/geode.h AMD IOMMU (AMD-VI) -M: Joerg Roedel <[email protected]> +M: Joerg Roedel <[email protected]> L: [email protected] T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git -S: Supported +S: Maintained F: drivers/iommu/amd_iommu*.[ch] F: include/linux/amd-iommu.h@@ -841,6 +841,14 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kristoffer/linux-hpc.git F: arch/arm/mach-sa1100/jornada720.c F: arch/arm/mach-sa1100/include/mach/jornada720.h +ARM/IGEP MACHINE SUPPORT +M: Enric Balletbo i Serra <[email protected]> +M: Javier Martinez Canillas <[email protected]> +L: [email protected] +L: [email protected] (moderated for non-subscribers) +S: Maintained +F: arch/arm/mach-omap2/board-igep0020.c + ARM/INCOME PXA270 SUPPORT M: Marek Vasut <[email protected]> L: [email protected] (moderated for non-subscribers)@@ -2507,6 +2515,7 @@ M: Joonyoung Shim <[email protected]> M: Seung-Woo Kim <[email protected]> M: Kyungmin Park <[email protected]> L: [email protected] +T: git git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git S: Supported F: drivers/gpu/drm/exynos F: include/drm/exynos*@@ -3597,6 +3606,49 @@ F: drivers/hid/hid-hyperv.c F: drivers/net/hyperv/ F: drivers/staging/hv/ +I2C OVER PARALLEL PORT +M: Jean Delvare <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/i2c/busses/i2c-parport +F: Documentation/i2c/busses/i2c-parport-light +F: drivers/i2c/busses/i2c-parport.c +F: drivers/i2c/busses/i2c-parport-light.c + +I2C/SMBUS CONTROLLER DRIVERS FOR PC +M: Jean Delvare <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/i2c/busses/i2c-ali1535 +F: Documentation/i2c/busses/i2c-ali1563 +F: Documentation/i2c/busses/i2c-ali15x3 +F: Documentation/i2c/busses/i2c-amd756 +F: Documentation/i2c/busses/i2c-amd8111 +F: Documentation/i2c/busses/i2c-i801 +F: Documentation/i2c/busses/i2c-nforce2 +F: Documentation/i2c/busses/i2c-piix4 +F: Documentation/i2c/busses/i2c-sis5595 +F: Documentation/i2c/busses/i2c-sis630 +F: Documentation/i2c/busses/i2c-sis96x +F: Documentation/i2c/busses/i2c-via +F: Documentation/i2c/busses/i2c-viapro +F: drivers/i2c/busses/i2c-ali1535.c +F: drivers/i2c/busses/i2c-ali1563.c +F: drivers/i2c/busses/i2c-ali15x3.c +F: drivers/i2c/busses/i2c-amd756.c +F: drivers/i2c/busses/i2c-amd756-s4882.c +F: drivers/i2c/busses/i2c-amd8111.c +F: drivers/i2c/busses/i2c-i801.c +F: drivers/i2c/busses/i2c-isch.c +F: drivers/i2c/busses/i2c-nforce2.c +F: drivers/i2c/busses/i2c-nforce2-s4985.c +F: drivers/i2c/busses/i2c-piix4.c +F: drivers/i2c/busses/i2c-sis5595.c +F: drivers/i2c/busses/i2c-sis630.c +F: drivers/i2c/busses/i2c-sis96x.c +F: drivers/i2c/busses/i2c-via.c +F: drivers/i2c/busses/i2c-viapro.c + I2C/SMBUS STUB DRIVER M: "Mark M. Hoffman" <[email protected]> L: [email protected]@@ -3604,9 +3656,8 @@ S: Maintained F: drivers/i2c/busses/i2c-stub.c I2C SUBSYSTEM -M: "Jean Delvare (PC drivers, core)" <[email protected]> +M: Wolfram Sang <[email protected]> M: "Ben Dooks (embedded platforms)" <[email protected]> -M: "Wolfram Sang (embedded platforms)" <[email protected]> L: [email protected] W: http://i2c.wiki.kernel.org/ T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/@@ -3617,6 +3668,13 @@ F: drivers/i2c/ F: include/linux/i2c.h F: include/linux/i2c-*.h +I2C-TAOS-EVM DRIVER +M: Jean Delvare <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/i2c/busses/i2c-taos-evm +F: drivers/i2c/busses/i2c-taos-evm.c + I2C-TINY-USB DRIVER M: Till Harbaum <[email protected]> L: [email protected]@@ -4230,8 +4288,8 @@ F: include/linux/lockd/ F: include/linux/sunrpc/ KERNEL VIRTUAL MACHINE (KVM) -M: Avi Kivity <[email protected]> M: Marcelo Tosatti <[email protected]> +M: Gleb Natapov <[email protected]> L: [email protected] W: http://kvm.qumranet.com S: Supported@@ -5655,7 +5713,7 @@ S: Maintained F: drivers/pinctrl/spear/ PKTCDVD DRIVER -M: Peter Osterlund <[email protected]> +M: Jiri Kosina <[email protected]> S: Maintained F: drivers/block/pktcdvd.c F: include/linux/pktcdvd.h@@ -7217,6 +7275,14 @@ L: [email protected] S: Maintained F: arch/xtensa/ +THERMAL +M: Zhang Rui <[email protected]> +L: [email protected] +T: git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git +S: Supported +F: drivers/thermal/ +F: include/linux/thermal.h + THINKPAD ACPI EXTRAS DRIVER M: Henrique de Moraes Holschuh <[email protected]> L: [email protected]@@ -7894,13 +7960,6 @@ M: Roger Luethi <[email protected]> S: Maintained F: drivers/net/ethernet/via/via-rhine.c -VIAPRO SMBUS DRIVER -M: Jean Delvare <[email protected]> -L: [email protected] -S: Maintained -F: Documentation/i2c/busses/i2c-viapro -F: drivers/i2c/busses/i2c-viapro.c - VIA SD/MMC CARD CONTROLLER DRIVER M: Bruce Chang <[email protected]> M: Harald Welte <[email protected]>Makefile +1
-1@@ -1,7 +1,7 @@ VERSION = 3 PATCHLEVEL = 7 SUBLEVEL = 0 -EXTRAVERSION = -rc3 +EXTRAVERSION = -rc6 NAME = Terrified Chipmunk # *DOCUMENTATION*arch/alpha/kernel/osf_sys.c +3
-3@@ -445,7 +445,7 @@ struct procfs_args {* unhappy with OSF UFS. [CHECKME] */ static int -osf_ufs_mount (char *dirname,struct ufs_args __user *args,int flags) +osf_ufs_mount (const char *dirname,struct ufs_args __user *args,int flags) {int retval;struct cdfs_args tmp;@@ -465,7 +465,7 @@ osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags) }static int -osf_cdfs_mount (char *dirname,struct cdfs_args __user *args,int flags) +osf_cdfs_mount (const char *dirname,struct cdfs_args __user *args,int flags) {int retval;struct cdfs_args tmp;@@ -485,7 +485,7 @@ osf_cdfs_mount(char *dirname, struct cdfs_args __user *args, int flags) }static int -osf_procfs_mount (char *dirname,struct procfs_args __user *args,int flags) +osf_procfs_mount (const char *dirname,struct procfs_args __user *args,int flags) {struct procfs_args tmp;arch/arm/boot/Makefile +5
-5@@ -33,7 +33,7 @@ ifeq ($(CONFIG_XIP_KERNEL),y) $(obj)/xipImage: vmlinux FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' + @$(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' $(obj)/Image $(obj)/zImage: FORCE @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)'@@ -48,14 +48,14 @@ $(obj)/xipImage: FORCE $(obj)/Image: vmlinux FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready' + @$(kecho) ' Kernel: $@ is ready' $(obj)/compressed/vmlinux: $(obj)/Image FORCE $(Q)$(MAKE) $(build)=$(obj)/compressed $@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready' + @$(kecho) ' Kernel: $@ is ready' endif@@ -90,7 +90,7 @@ fi $(obj)/uImage: $(obj)/zImage FORCE @$(check_for_multiple_loadaddr) $(call if_changed,uimage) - $(kecho) ' Image $@ is ready' + @$(kecho) ' Image $@ is ready' $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE $(Q)$(MAKE) $(build)=$(obj)/bootp $@@@ -98,7 +98,7 @@ $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE $(obj)/bootpImage: $(obj)/bootp/bootp FORCE $(call if_changed,objcopy) - $(kecho) ' Kernel: $@ is ready' + @$(kecho) ' Kernel: $@ is ready' PHONY += initrd FORCE initrd:arch/arm/boot/dts/tegra30.dtsi +2
-2@@ -73,8 +73,8 @@ pinmux: pinmux { compatible = "nvidia,tegra30-pinmux"; - reg = <0x70000868 0xd0 /* Pad control registers */ - 0x70003000 0x3e0>; /* Mux registers */ + reg = <0x70000868 0xd4 /* Pad control registers */ + 0x70003000 0x3e4>; /* Mux registers */ }; serial@70006000 {arch/arm/include/asm/io.h +2
-2@@ -64,7 +64,7 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);static inline void __raw_writew (u16 val,volatile void __iomem *addr) { asmvolatile ("strh %1, %0" - :"+Qo" (*(volatile u16 __force *)addr) + :"+Q" (*(volatile u16 __force *)addr) :"r" (val)); }@@ -72,7 +72,7 @@ static inline u16 __raw_readw(const volatile void __iomem *addr) {u16 val; asmvolatile ("ldrh %1, %0" - :"+Qo" (*(volatile u16 __force *)addr), + :"+Q" (*(volatile u16 __force *)addr),"=r" (val));return val; }arch/arm/include/asm/sched_clock.h +0
-2@@ -10,7 +10,5 @@extern void sched_clock_postinit (void );extern void setup_sched_clock (u32 (*read)(void ),int bits,unsigned long rate); -extern void setup_sched_clock_needs_suspend (u32 (*read)(void ),int bits, -unsigned long rate);#endif arch/arm/include/asm/vfpmacros.h +6
-6@@ -27,9 +27,9 @@#if __LINUX_ARM_ARCH__ <=6 ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] - tst \tmp, #HWCAP_VFPv3D16 - ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} - addne \base, \base, #32*4 @ step over unused register space + tst \tmp, #HWCAP_VFPD32 + ldcnel p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} + addeq \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field@@ -51,9 +51,9 @@#if __LINUX_ARM_ARCH__ <=6 ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] - tst \tmp, #HWCAP_VFPv3D16 - stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} - addne \base, \base, #32*4 @ step over unused register space + tst \tmp, #HWCAP_VFPD32 + stcnel p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} + addeq \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD fieldarch/arm/include/uapi/asm/hwcap.h +2
-1@@ -18,11 +18,12 @@#define HWCAP_THUMBEE (1 << 11)#define HWCAP_NEON (1 << 12)#define HWCAP_VFPv3 (1 << 13) -#define HWCAP_VFPv3D16 (1 << 14) +#define HWCAP_VFPv3D16 (1 << 14)/* also set for VFPv4-D16 */ #define HWCAP_TLS (1 << 15)#define HWCAP_VFPv4 (1 << 16)#define HWCAP_IDIVA (1 << 17)#define HWCAP_IDIVT (1 << 18) +#define HWCAP_VFPD32 (1 << 19)/* set if VFP has 32 regs (not 16) */ #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)arch/arm/kernel/sched_clock.c +4
-14@@ -107,13 +107,6 @@ static void sched_clock_poll(unsigned long wrap_ticks)update_sched_clock (); } -void __init setup_sched_clock_needs_suspend (u32 (*read)(void ),int bits, -unsigned long rate) -{ -setup_sched_clock (read, bits, rate); - cd.needs_suspend = true; -} -void __init setup_sched_clock (u32 (*read)(void ),int bits,unsigned long rate) {unsigned long r, w;@@ -189,18 +182,15 @@ void __init sched_clock_postinit(void)static int sched_clock_suspend (void ) {sched_clock_poll (sched_clock_timer.data); -if (cd.needs_suspend) - cd.suspended = true; + cd.suspended = true;return 0 ; }static void sched_clock_resume (void ) { -if (cd.needs_suspend) { - cd.epoch_cyc =read_sched_clock (); - cd.epoch_cyc_copy = cd.epoch_cyc; - cd.suspended = false; - } + cd.epoch_cyc =read_sched_clock (); + cd.epoch_cyc_copy = cd.epoch_cyc; + cd.suspended = false; }static struct syscore_ops sched_clock_ops = {arch/arm/mach-at91/at91rm9200_devices.c +1
-1@@ -68,7 +68,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }arch/arm/mach-at91/at91sam9260_devices.c +1
-1@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }arch/arm/mach-at91/at91sam9261_devices.c +1
-1@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }arch/arm/mach-at91/at91sam9263_devices.c +1
-1@@ -78,7 +78,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)/* Enable overcurrent notification */ for (i =0 ; i < data->ports; i++) { -if (data->overcurrent_pin[i]) +if (gpio_is_valid (data->overcurrent_pin[i]))at91_set_gpio_input (data->overcurrent_pin[i],1 ); }arch/arm/mach-at91/at91sam9g45_devices.c +6
-6@@ -1841,8 +1841,8 @@ static struct resource sha_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };@@ -1874,8 +1874,8 @@ static struct resource tdes_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };@@ -1910,8 +1910,8 @@ static struct resource aes_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };arch/arm/mach-davinci/dm644x.c +1
-2@@ -713,8 +713,7 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,break ;case VPBE_ENC_CUSTOM_TIMINGS :if (pclock <=27000000 ) { - v |=DM644X_VPSS_MUXSEL_PLL2_MODE | -DM644X_VPSS_DACCLKEN ; + v |=DM644X_VPSS_DACCLKEN ;writel (v,DAVINCI_SYSMOD_VIRT (SYSMOD_VPSS_CLKCTL )); }else {/* arch/arm/mach-highbank/system.c +2
-1@@ -28,6 +28,7 @@ void highbank_restart(char mode, const char *cmd)hignbank_set_pwr_soft_reset ();scu_power_mode (scu_base_addr,SCU_PM_POWEROFF ); -cpu_do_idle (); +while (1 ) +cpu_do_idle (); }arch/arm/mach-imx/clk-gate2.c +1
-1@@ -112,7 +112,7 @@ struct clk *clk_register_gate2(struct device *dev, const char *name, clk =clk_register (dev, &gate->hw);if (IS_ERR (clk)) -kfree (clk); +kfree (gate);return clk; }arch/arm/mach-imx/ehci-imx25.c +1
-1@@ -30,7 +30,7 @@#define MX25_H1_SIC_SHIFT 21#define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT)#define MX25_H1_PP_BIT (1 << 18) -#define MX25_H1_PM_BIT (1 << 8) +#define MX25_H1_PM_BIT (1 << 16)#define MX25_H1_IPPUE_UP_BIT (1 << 7)#define MX25_H1_IPPUE_DOWN_BIT (1 << 6)#define MX25_H1_TLL_BIT (1 << 5)arch/arm/mach-imx/ehci-imx35.c +1
-1@@ -30,7 +30,7 @@#define MX35_H1_SIC_SHIFT 21#define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT)#define MX35_H1_PP_BIT (1 << 18) -#define MX35_H1_PM_BIT (1 << 8) +#define MX35_H1_PM_BIT (1 << 16)#define MX35_H1_IPPUE_UP_BIT (1 << 7)#define MX35_H1_IPPUE_DOWN_BIT (1 << 6)#define MX35_H1_TLL_BIT (1 << 5)arch/arm/mach-omap2/board-igep0020.c +5
-0@@ -580,6 +580,11 @@ static void __init igep_wlan_bt_init(void) }else return ; +/* Make sure that the GPIO pins are muxed correctly */ +omap_mux_init_gpio (igep_wlan_bt_gpios[0 ].gpio,OMAP_PIN_OUTPUT ); +omap_mux_init_gpio (igep_wlan_bt_gpios[1 ].gpio,OMAP_PIN_OUTPUT ); +omap_mux_init_gpio (igep_wlan_bt_gpios[2 ].gpio,OMAP_PIN_OUTPUT ); + err =gpio_request_array (igep_wlan_bt_gpios,ARRAY_SIZE (igep_wlan_bt_gpios));if (err) {arch/arm/mach-omap2/clockdomains44xx_data.c +1
-1@@ -359,7 +359,7 @@ static struct clockdomain iss_44xx_clkdm = { .clkdm_offs = OMAP4430_CM2_CAM_CAM_CDOFFS, .wkdep_srcs = iss_wkup_sleep_deps, .sleepdep_srcs = iss_wkup_sleep_deps, - .flags = CLKDM_CAN_HWSUP_SWSUP, + .flags = CLKDM_CAN_SWSUP, };static struct clockdomain l3_dss_44xx_clkdm = {arch/arm/mach-omap2/devices.c +79
-0@@ -19,6 +19,7 @@#include <linux/of.h> #include <linux/pinctrl/machine.h> #include <linux/platform_data/omap4-keypad.h> +#include <linux/platform_data/omap_ocp2scp.h> #include <asm/mach-types.h> #include <asm/mach/map.h> @@ -613,6 +614,83 @@ static void omap_init_vout(void)static inline void omap_init_vout (void ) {}#endif +#if defined(CONFIG_OMAP_OCP2SCP ) || defined(CONFIG_OMAP_OCP2SCP_MODULE ) +static int count_ocp2scp_devices (struct omap_ocp2scp_dev *ocp2scp_dev) +{ +int cnt =0 ; + +while (ocp2scp_dev->drv_name !=NULL ) { + cnt++; + ocp2scp_dev++; + } + +return cnt; +} + +static void omap_init_ocp2scp (void ) +{ +struct omap_hwmod *oh; +struct platform_device *pdev; +int bus_id =-1 , dev_cnt =0 , i; +struct omap_ocp2scp_dev *ocp2scp_dev; +const char *oh_name, *name; +struct omap_ocp2scp_platform_data *pdata; + +if (!cpu_is_omap44xx ()) +return ; + + oh_name ="ocp2scp_usb_phy" ; + name ="omap-ocp2scp" ; + + oh =omap_hwmod_lookup (oh_name); +if (!oh) { +pr_err ("%s: could not find omap_hwmod for %s\n" , __func__, + oh_name); +return ; + } + + pdata =kzalloc (sizeof (*pdata),GFP_KERNEL ); +if (!pdata) { +pr_err ("%s: No memory for ocp2scp pdata\n" , __func__); +return ; + } + + ocp2scp_dev = oh->dev_attr; + dev_cnt =count_ocp2scp_devices (ocp2scp_dev); + +if (!dev_cnt) { +pr_err ("%s: No devices connected to ocp2scp\n" , __func__); +kfree (pdata); +return ; + } + + pdata->devices =kzalloc (sizeof (struct omap_ocp2scp_dev *) + * dev_cnt,GFP_KERNEL ); +if (!pdata->devices) { +pr_err ("%s: No memory for ocp2scp pdata devices\n" , __func__); +kfree (pdata); +return ; + } + +for (i =0 ; i < dev_cnt; i++, ocp2scp_dev++) + pdata->devices[i] = ocp2scp_dev; + + pdata->dev_cnt = dev_cnt; + + pdev =omap_device_build (name, bus_id, oh, pdata,sizeof (*pdata),NULL , +0 , false); +if (IS_ERR (pdev)) { +pr_err ("Could not build omap_device for %s %s\n" , + name, oh_name); +kfree (pdata->devices); +kfree (pdata); +return ; + } +} +#else +static inline void omap_init_ocp2scp (void ) { } +#endif +/*-------------------------------------------------------------------------*/ static int __init omap2_init_devices (void )@@ -640,6 +718,7 @@ static int __init omap2_init_devices(void)omap_init_sham ();omap_init_aes ();omap_init_vout (); +omap_init_ocp2scp ();return 0 ; }arch/arm/mach-omap2/omap_hwmod.c +49
-14@@ -422,6 +422,38 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v) }/** +* _wait_softreset_complete - wait for an OCP softreset to complete +* @oh: struct omap_hwmod * to wait on +* +* Wait until the IP block represented by @oh reports that its OCP +* softreset is complete. This can be triggered by software (see +* _ocp_softreset()) or by hardware upon returning from off-mode (one +* example is HSMMC). Waits for up to MAX_MODULE_SOFTRESET_WAIT +* microseconds. Returns the number of microseconds waited. +*/ +static int _wait_softreset_complete (struct omap_hwmod *oh) +{ +struct omap_hwmod_class_sysconfig *sysc; +u32 softrst_mask; +int c =0 ; + + sysc = oh->class->sysc; + +if (sysc->sysc_flags &SYSS_HAS_RESET_STATUS ) +omap_test_timeout ((omap_hwmod_read (oh, sysc->syss_offs) + &SYSS_RESETDONE_MASK ), +MAX_MODULE_SOFTRESET_WAIT , c); +else if (sysc->sysc_flags &SYSC_HAS_RESET_STATUS ) { + softrst_mask = (0x1 << sysc->sysc_fields->srst_shift); +omap_test_timeout (!(omap_hwmod_read (oh, sysc->sysc_offs) + & softrst_mask), +MAX_MODULE_SOFTRESET_WAIT , c); + } + +return c; +} + +/** * _set_dmadisable: set OCP_SYSCONFIG.DMADISABLE bit in @v * @oh: struct omap_hwmod * * @@ -1282,6 +1314,18 @@ static void _enable_sysc(struct omap_hwmod *oh)if (!oh->class->sysc)return ; +/* +* Wait until reset has completed, this is needed as the IP +* block is reset automatically by hardware in some cases +* (off-mode for example), and the drivers require the +* IP to be ready when they access it +*/ +if (oh->flags &HWMOD_CONTROL_OPT_CLKS_IN_RESET ) +_enable_optional_clocks (oh); +_wait_softreset_complete (oh); +if (oh->flags &HWMOD_CONTROL_OPT_CLKS_IN_RESET ) +_disable_optional_clocks (oh); + v = oh->_sysc_cache; sf = oh->class->sysc->sysc_flags;@@ -1804,7 +1848,7 @@ static int _am33xx_disable_module(struct omap_hwmod *oh)*/ static int _ocp_softreset (struct omap_hwmod *oh) { -u32 v, softrst_mask; +u32 v;int c =0 ;int ret =0 ;@@ -1834,19 +1878,7 @@ static int _ocp_softreset(struct omap_hwmod *oh)if (oh->class->sysc->srst_udelay)udelay (oh->class->sysc->srst_udelay); -if (oh->class->sysc->sysc_flags &SYSS_HAS_RESET_STATUS ) -omap_test_timeout ((omap_hwmod_read (oh, - oh->class->sysc->syss_offs) - &SYSS_RESETDONE_MASK ), -MAX_MODULE_SOFTRESET_WAIT , c); -else if (oh->class->sysc->sysc_flags &SYSC_HAS_RESET_STATUS ) { - softrst_mask = (0x1 << oh->class->sysc->sysc_fields->srst_shift); -omap_test_timeout (!(omap_hwmod_read (oh, - oh->class->sysc->sysc_offs) - & softrst_mask), -MAX_MODULE_SOFTRESET_WAIT , c); - } - + c =_wait_softreset_complete (oh);if (c ==MAX_MODULE_SOFTRESET_WAIT )pr_warning ("omap_hwmod: %s: softreset failed (waited %d usec)\n" , oh->name,MAX_MODULE_SOFTRESET_WAIT );@@ -2352,6 +2384,9 @@ static int __init _setup_reset(struct omap_hwmod *oh)if (oh->_state != _HWMOD_STATE_INITIALIZED)return -EINVAL ; +if (oh->flags &HWMOD_EXT_OPT_MAIN_CLK ) +return -EPERM ; +if (oh->rst_lines_cnt ==0 ) { r =_enable (oh);if (r) {arch/arm/mach-omap2/omap_hwmod_44xx_data.c +36
-0@@ -21,6 +21,7 @@#include <linux/io.h> #include <linux/platform_data/gpio-omap.h> #include <linux/power/smartreflex.h> +#include <linux/platform_data/omap_ocp2scp.h> #include <plat/omap_hwmod.h> #include <plat/i2c.h> @@ -2125,6 +2126,14 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = { .name = "mcpdm", .class = &omap44xx_mcpdm_hwmod_class, .clkdm_name = "abe_clkdm", +/* +* It's suspected that the McPDM requires an off-chip main +* functional clock, controlled via I2C. This IP block is +* currently reset very early during boot, before I2C is +* available, so it doesn't seem that we have any choice in +* the kernel other than to avoid resetting it. +*/ + .flags = HWMOD_EXT_OPT_MAIN_CLK, .mpu_irqs = omap44xx_mcpdm_irqs, .sdma_reqs = omap44xx_mcpdm_sdma_reqs, .main_clk = "mcpdm_fck",@@ -2681,6 +2690,32 @@ static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = { .sysc = &omap44xx_ocp2scp_sysc, }; +/* ocp2scp dev_attr */ +static struct resource omap44xx_usb_phy_and_pll_addrs[] = { + { + .name ="usb_phy" , + .start =0x4a0ad080 , + .end =0x4a0ae000 , + .flags =IORESOURCE_MEM , + }, + { +/* XXX: Remove this once control module driver is in place */ + .name ="ctrl_dev" , + .start =0x4a002300 , + .end =0x4a002303 , + .flags =IORESOURCE_MEM , + }, + { } +}; + +static struct omap_ocp2scp_dev ocp2scp_dev_attr[] = { + { + .drv_name ="omap-usb2" , + .res = omap44xx_usb_phy_and_pll_addrs, + }, + { } +}; +/* ocp2scp_usb_phy */ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { .name ="ocp2scp_usb_phy" ,@@ -2694,6 +2729,7 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { .modulemode = MODULEMODE_HWCTRL, }, }, + .dev_attr = ocp2scp_dev_attr, };/* arch/arm/mach-omap2/twl-common.c +2
-1@@ -73,6 +73,7 @@ void __init omap4_pmic_init(const char *pmic_type, {/* PMIC part*/ omap_mux_init_signal ("sys_nirq1" ,OMAP_PIN_INPUT_PULLUP |OMAP_PIN_OFF_WAKEUPENABLE ); +omap_mux_init_signal ("fref_clk0_out.sys_drm_msecure" ,OMAP_PIN_OUTPUT );omap_pmic_init (1 ,400 , pmic_type,7 +OMAP44XX_IRQ_GIC_START , pmic_data);/* Register additional devices on i2c1 bus if needed */ @@ -366,7 +367,7 @@ static struct regulator_init_data omap4_clk32kg_idata = { };static struct regulator_consumer_supply omap4_vdd1_supply[] = { -REGULATOR_SUPPLY ("vcc" ,"mpu.0" ), +REGULATOR_SUPPLY ("vcc" ,"cpu0" ), };static struct regulator_consumer_supply omap4_vdd2_supply[] = {arch/arm/mach-omap2/vc.c +1
-1@@ -264,7 +264,7 @@ static void __init omap_vc_i2c_init(struct voltagedomain *voltdm)if (initialized) {if (voltdm->pmic->i2c_high_speed != i2c_high_speed) -pr_warn ("%s: I2C config for vdd_%s does not match other channels (%u)." , +pr_warn ("%s: I2C config for vdd_%s does not match other channels (%u).\n" , __func__, voltdm->name, i2c_high_speed);return ; }arch/arm/mach-pxa/hx4700.c +7
-1@@ -28,6 +28,7 @@#include <linux/mfd/asic3.h> #include <linux/mtd/physmap.h> #include <linux/pda_power.h> +#include <linux/pwm.h> #include <linux/pwm_backlight.h> #include <linux/regulator/driver.h> #include <linux/regulator/gpio-regulator.h> @@ -556,7 +557,7 @@ static struct platform_device hx4700_lcd = {*/ static struct platform_pwm_backlight_data backlight_data = { - .pwm_id =1 , + .pwm_id =-1 ,/* Superseded by pwm_lookup */ .max_brightness =200 , .dft_brightness =100 , .pwm_period_ns =30923 ,@@ -571,6 +572,10 @@ static struct platform_device backlight = { }, }; +static struct pwm_lookup hx4700_pwm_lookup[] = { +PWM_LOOKUP ("pxa27x-pwm.1" ,0 ,"pwm-backlight" ,NULL ), +}; +/* * USB "Transceiver" */ @@ -872,6 +877,7 @@ static void __init hx4700_init(void)pxa_set_stuart_info (NULL );platform_add_devices (devices,ARRAY_SIZE (devices)); +pwm_add_table (hx4700_pwm_lookup,ARRAY_SIZE (hx4700_pwm_lookup));pxa_set_ficp_info (&ficp_info);pxa27x_set_i2c_power_info (NULL );arch/arm/mach-pxa/spitz_pm.c +2
-6@@ -86,10 +86,7 @@ static void spitz_discharge1(int on)gpio_set_value (SPITZ_GPIO_LED_GREEN , on); } -static unsigned long gpio18_config[] = { -GPIO18_RDY , -GPIO18_GPIO , -}; +static unsigned long gpio18_config =GPIO18_GPIO ;static void spitz_presuspend (void ) {@@ -112,7 +109,7 @@ static void spitz_presuspend(void)PGSR3 &= ~SPITZ_GPIO_G3_STROBE_BIT ;PGSR2 |=GPIO_bit (SPITZ_GPIO_KEY_STROBE0 ); -pxa2xx_mfp_config (&gpio18_config[0 ],1 ); +pxa2xx_mfp_config (&gpio18_config,1 );gpio_request_one (18 ,GPIOF_OUT_INIT_HIGH ,"Unknown" );gpio_free (18 );@@ -131,7 +128,6 @@ static void spitz_presuspend(void)static void spitz_postsuspend (void ) { -pxa2xx_mfp_config (&gpio18_config[1 ],1 ); }static int spitz_should_wakeup (unsigned int resume_on_alarm)arch/arm/mm/alignment.c +1
-1@@ -745,7 +745,7 @@ do_alignment_t32_to_handler(unsigned long *pinstr, struct pt_regs *regs,static int do_alignment (unsigned long addr,unsigned int fsr,struct pt_regs *regs) { -union offset_union offset; +union offset_union uninitialized_var (offset );unsigned long instr =0 , instrptr;int (*handler)(unsigned long addr,unsigned long instr,struct pt_regs *regs);unsigned int type;arch/arm/plat-omap/include/plat/omap_hwmod.h +6
-0@@ -443,6 +443,11 @@ struct omap_hwmod_omap4_prcm {* in order to complete the reset. Optional clocks will be disabled * again after the reset. * HWMOD_16BIT_REG: Module has 16bit registers +* HWMOD_EXT_OPT_MAIN_CLK: The only main functional clock source for +* this IP block comes from an off-chip source and is not always +* enabled. This prevents the hwmod code from being able to +* enable and reset the IP block early. XXX Eventually it should +* be possible to query the clock framework for this information. */ #define HWMOD_SWSUP_SIDLE (1 << 0)#define HWMOD_SWSUP_MSTANDBY (1 << 1)@@ -453,6 +458,7 @@ struct omap_hwmod_omap4_prcm {#define HWMOD_NO_IDLEST (1 << 6)#define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7)#define HWMOD_16BIT_REG (1 << 8) +#define HWMOD_EXT_OPT_MAIN_CLK (1 << 9)/* * omap_hwmod._int_flags definitions arch/arm/tools/Makefile +1
-1@@ -5,6 +5,6 @@ # include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types - $(kecho) ' Generating $@' + @$(kecho) ' Generating $@' @mkdir -p $(dir $@) $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }arch/arm/vfp/vfpmodule.c +6
-3@@ -701,11 +701,14 @@ static int __init vfp_init(void) elf_hwcap |= HWCAP_VFPv3;/* -* Check for VFPv3 D16. CPUs in this configuration -* only have 16 x 64bit registers. +* Check for VFPv3 D16 and VFPv4 D16. CPUs in +* this configuration only have 16 x 64bit +* registers. */ if (((fmrx (MVFR0 ) &MVFR0_A_SIMD_MASK )) ==1 ) - elf_hwcap |= HWCAP_VFPv3D16; + elf_hwcap |= HWCAP_VFPv3D16;/* also v4-D16 */ +else + elf_hwcap |= HWCAP_VFPD32; }#endif /* arch/arm/xen/enlighten.c +11
-0@@ -166,3 +166,14 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) *pages =NULL ; }EXPORT_SYMBOL_GPL (free_xenballooned_pages); + +/* In the hypervisor.S file. */ +EXPORT_SYMBOL_GPL (HYPERVISOR_event_channel_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_grant_table_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_xen_version); +EXPORT_SYMBOL_GPL (HYPERVISOR_console_io); +EXPORT_SYMBOL_GPL (HYPERVISOR_sched_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_hvm_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_memory_op); +EXPORT_SYMBOL_GPL (HYPERVISOR_physdev_op); +EXPORT_SYMBOL_GPL (privcmd_call);arch/arm/xen/hypercall.S +5
-9@@ -48,20 +48,16 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/opcodes-virt.h> #include <xen/interface/xen.h> -/* HVC 0xEA1 */ -#ifdef CONFIG_THUMB2_KERNEL -#define xen_hvc .word 0xf7e08ea1 -#else -#define xen_hvc .word 0xe140ea71 -#endif +#define XEN_IMM 0xEA1 #define HYPERCALL_SIMPLE(hypercall) \ ENTRY(HYPERVISOR_##hypercall) \ mov r12, #__HYPERVISOR_##hypercall; \ - xen_hvc; \ + __HVC(XEN_IMM); \ mov pc, lr; \ ENDPROC(HYPERVISOR_##hypercall)@@ -76,7 +72,7 @@ ENTRY(HYPERVISOR_##hypercall) \ stmdb sp!, {r4} \ ldr r4, [sp, #4] \ mov r12, #__HYPERVISOR_##hypercall; \ - xen_hvc \ + __HVC(XEN_IMM); \ ldm sp!, {r4} \ mov pc, lr \ ENDPROC(HYPERVISOR_##hypercall)@@ -100,7 +96,7 @@ ENTRY(privcmd_call) mov r2, r3 ldr r3, [sp, #8] ldr r4, [sp, #4] - xen_hvc + __HVC(XEN_IMM) ldm sp!, {r4} mov pc, lr ENDPROC(privcmd_call);arch/arm64/Kconfig +1
-0@@ -1,6 +1,7 @@ config ARM64 def_bool y select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE + select ARCH_WANT_COMPAT_IPC_PARSE_VERSION select GENERIC_CLOCKEVENTS select GENERIC_HARDIRQS_NO_DEPRECATED select GENERIC_IOMAParch/arm64/include/asm/elf.h +1
-4@@ -25,12 +25,10 @@#include <asm/user.h> typedef unsigned long elf_greg_t ; -typedef unsigned long elf_freg_t [3 ];#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))typedef elf_greg_t elf_gregset_t [ELF_NGREG ]; - -typedef struct user_fp elf_fpregset_t ; +typedef struct user_fpsimd_state elf_fpregset_t ;#define EM_AARCH64 183@@ -87,7 +85,6 @@ typedef struct user_fp elf_fpregset_t;#define R_AARCH64_MOVW_PREL_G2_NC 292#define R_AARCH64_MOVW_PREL_G3 293 -/* * These are used to set parameters in the core dumps. */ arch/arm64/include/asm/fpsimd.h +2
-3@@ -25,9 +25,8 @@* - FPSR and FPCR * - 32 128-bit data registers * -* Note that user_fp forms a prefix of this structure, which is relied -* upon in the ptrace FP/SIMD accessors. struct user_fpsimd_state must -* form a prefix of struct fpsimd_state. +* Note that user_fpsimd forms a prefix of this structure, which is +* relied upon in the ptrace FP/SIMD accessors. */ struct fpsimd_state { union {arch/arm64/include/asm/io.h +5
-5@@ -114,7 +114,7 @@ static inline u64 __raw_readq(const volatile void __iomem *addr)* I/O port access primitives. */ #define IO_SPACE_LIMIT 0xffff -#define PCI_IOBASE ((void __iomem *)0xffffffbbfffe0000UL) +#define PCI_IOBASE ((void __iomem *)(MODULES_VADDR - SZ_2M))static inline u8 inb (unsigned long addr) {@@ -222,12 +222,12 @@ extern void __iomem *__ioremap(phys_addr_t phys_addr, size_t size, pgprot_t protextern void __iounmap (volatile void __iomem *addr);#define PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_DIRTY) -#define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_XN | PTE_ATTRINDX(MT_DEVICE_nGnRE)) +#define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE))#define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC)) -#define ioremap (addr, size) __ioremap((addr), (size), PROT_DEVICE_nGnRE) -#define ioremap_nocache (addr, size) __ioremap((addr), (size), PROT_DEVICE_nGnRE) -#define ioremap_wc (addr, size) __ioremap((addr), (size), PROT_NORMAL_NC) +#define ioremap (addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) +#define ioremap_nocache (addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) +#define ioremap_wc (addr, size) __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))#define iounmap __iounmap#define ARCH_HAS_IOREMAP_WC arch/arm64/include/asm/pgtable-hwdef.h +4
-2@@ -38,7 +38,8 @@#define PMD_SECT_S (_AT(pmdval_t, 3) << 8)#define PMD_SECT_AF (_AT(pmdval_t, 1) << 10)#define PMD_SECT_NG (_AT(pmdval_t, 1) << 11) -#define PMD_SECT_XN (_AT(pmdval_t, 1) << 54) +#define PMD_SECT_PXN (_AT(pmdval_t, 1) << 53) +#define PMD_SECT_UXN (_AT(pmdval_t, 1) << 54)/* * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). @@ -57,7 +58,8 @@#define PTE_SHARED (_AT(pteval_t, 3) << 8)/* SH[1:0], inner shareable */ #define PTE_AF (_AT(pteval_t, 1) << 10)/* Access Flag */ #define PTE_NG (_AT(pteval_t, 1) << 11)/* nG */ -#define PTE_XN (_AT(pteval_t, 1) << 54)/* XN */ +#define PTE_PXN (_AT(pteval_t, 1) << 53)/* Privileged XN */ +#define PTE_UXN (_AT(pteval_t, 1) << 54)/* User XN */ /* * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). arch/arm64/include/asm/pgtable.h +20
-20@@ -62,23 +62,23 @@ extern pgprot_t pgprot_default;#define _MOD_PROT (p, b) __pgprot(pgprot_val(p) | (b)) -#define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_XN | PTE_RDONLY) -#define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN) -#define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG) -#define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define PAGE_COPY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_RDONLY) -#define PAGE_READONLY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define PAGE_READONLY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_RDONLY) -#define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_XN | PTE_DIRTY) -#define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_DIRTY) - -#define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_XN | PTE_RDONLY) -#define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN) -#define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG) -#define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define __PAGE_COPY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_RDONLY) -#define __PAGE_READONLY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) -#define __PAGE_READONLY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_RDONLY) +#define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) +#define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN) +#define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define PAGE_COPY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) +#define PAGE_READONLY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define PAGE_READONLY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) +#define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_PXN | PTE_UXN | PTE_DIRTY) +#define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_UXN | PTE_DIRTY) + +#define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) +#define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN) +#define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define __PAGE_COPY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) +#define __PAGE_READONLY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) +#define __PAGE_READONLY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY)#endif /* __ASSEMBLY__ */ @@ -130,10 +130,10 @@ extern struct page *empty_zero_page;#define pte_young (pte) (pte_val(pte) & PTE_AF)#define pte_special (pte) (pte_val(pte) & PTE_SPECIAL)#define pte_write (pte) (!(pte_val(pte) & PTE_RDONLY)) -#define pte_exec (pte) (!(pte_val(pte) & PTE_XN)) +#define pte_exec (pte) (!(pte_val(pte) & PTE_UXN))#define pte_present_exec_user (pte) \ - ((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_XN)) == \ + ((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_UXN)) == \ (PTE_VALID | PTE_USER))#define PTE_BIT_FUNC (fn,op) \@@ -262,7 +262,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)static inline pte_t pte_modify (pte_t pte,pgprot_t newprot) { -const pteval_t mask =PTE_USER |PTE_XN |PTE_RDONLY ; +const pteval_t mask =PTE_USER |PTE_PXN |PTE_UXN |PTE_RDONLY ;pte_val (pte) = (pte_val (pte) & ~mask) | (pgprot_val (newprot) & mask);return pte; }arch/arm64/include/asm/processor.h +2
-0@@ -43,6 +43,8 @@#else #define STACK_TOP STACK_TOP_MAX#endif /* CONFIG_COMPAT */ + +#define ARCH_LOW_ADDRESS_LIMIT PHYS_MASK#endif /* __KERNEL__ */ struct debug_info {arch/arm64/include/asm/unistd.h +0
-1@@ -14,7 +14,6 @@* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifdef CONFIG_COMPAT -#define __ARCH_WANT_COMPAT_IPC_PARSE_VERSION#define __ARCH_WANT_COMPAT_STAT64#define __ARCH_WANT_SYS_GETHOSTNAME#define __ARCH_WANT_SYS_PAUSEarch/arm64/kernel/perf_event.c +2
-8@@ -613,17 +613,11 @@ enum armv8_pmuv3_perf_types {ARMV8_PMUV3_PERFCTR_BUS_ACCESS =0x19 ,ARMV8_PMUV3_PERFCTR_MEM_ERROR =0x1A , ARMV8_PMUV3_PERFCTR_BUS_CYCLES = 0x1D, - -/* -* This isn't an architected event. -* We detect this event number and use the cycle counter instead. -*/ - ARMV8_PMUV3_PERFCTR_CPU_CYCLES = 0xFF, };/* PMUv3 HW events mapping. */ static const unsigned armv8_pmuv3_perf_map[PERF_COUNT_HW_MAX ] = { - [PERF_COUNT_HW_CPU_CYCLES ] =ARMV8_PMUV3_PERFCTR_CPU_CYCLES , + [PERF_COUNT_HW_CPU_CYCLES ] =ARMV8_PMUV3_PERFCTR_CLOCK_CYCLES , [PERF_COUNT_HW_INSTRUCTIONS ] =ARMV8_PMUV3_PERFCTR_INSTR_EXECUTED , [PERF_COUNT_HW_CACHE_REFERENCES ] =ARMV8_PMUV3_PERFCTR_L1_DCACHE_ACCESS , [PERF_COUNT_HW_CACHE_MISSES] = ARMV8_PMUV3_PERFCTR_L1_DCACHE_REFILL,@@ -1106,7 +1100,7 @@ static int armv8pmu_get_event_idx(struct pmu_hw_events *cpuc,unsigned long evtype = event->config_base &ARMV8_EVTYPE_EVENT ;/* Always place a cycle counter into the cycle counter. */ -if (evtype ==ARMV8_PMUV3_PERFCTR_CPU_CYCLES ) { +if (evtype ==ARMV8_PMUV3_PERFCTR_CLOCK_CYCLES ) {if (test_and_set_bit (ARMV8_IDX_CYCLE_COUNTER , cpuc->used_mask))return -EAGAIN ;arch/arm64/kernel/process.c +0
-18@@ -310,24 +310,6 @@ struct task_struct *__switch_to(struct task_struct *prev, }/* -* Fill in the task's elfregs structure for a core dump. -*/ -int dump_task_regs (struct task_struct *t,elf_gregset_t *elfregs) -{ -elf_core_copy_regs (elfregs,task_pt_regs (t)); -return 1 ; -} - -/* -* fill in the fpe structure for a core dump... -*/ -int dump_fpu (struct pt_regs *regs,struct user_fp *fp) -{ -return 0 ; -} -EXPORT_SYMBOL (dump_fpu); - -/* * Shuffle the argument into the correct register before calling the * thread function. x1 is the thread argument, x2 is the pointer to * the thread function, and x3 points to the exit function. arch/arm64/kernel/smp.c +1
-2@@ -211,8 +211,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void)* before we continue. */ set_cpu_online (cpu, true); -while (!cpu_active (cpu)) -cpu_relax (); +complete (&cpu_running);/* * OK, it's off to the idle thread for us arch/arm64/mm/init.c +1
-1@@ -80,7 +80,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)#ifdef CONFIG_ZONE_DMA32 /* 4GB maximum for 32-bit only capable devices */ max_dma32 =min (max,MAX_DMA32_PFN ); - zone_size[ZONE_DMA32 ] = max_dma32 - min; + zone_size[ZONE_DMA32 ] =max (min, max_dma32) - min;#endif zone_size[ZONE_NORMAL ] = max - max_dma32;arch/frv/Kconfig +1
-0@@ -13,6 +13,7 @@ config FRV select GENERIC_CPU_DEVICES select ARCH_WANT_IPC_PARSE_VERSION select GENERIC_KERNEL_THREAD + select GENERIC_KERNEL_EXECVE config ZONE_DMA boolarch/frv/boot/Makefile +6
-4@@ -17,6 +17,8 @@ PARAMS_PHYS = 0x0207c000 INITRD_PHYS = 0x02180000 INITRD_VIRT = 0x02180000 +OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment + # # If you don't define ZRELADDR above, # then it defaults to ZTEXTADDR@@ -32,18 +34,18 @@ Image: $(obj)/Image targets: $(obj)/Image $(obj)/Image: vmlinux FORCE - $(OBJCOPY) -O binary -R .note -R .comment -S vmlinux $@ + $(OBJCOPY) $(OBJCOPYFLAGS) -S vmlinux $@ #$(obj)/Image: $(CONFIGURE) $(SYSTEM) -# $(OBJCOPY) -O binary -R .note -R .comment -g -S $(SYSTEM) $@ +# $(OBJCOPY) $(OBJCOPYFLAGS) -g -S $(SYSTEM) $@ bzImage: zImage zImage: $(CONFIGURE) compressed/$(LINUX) - $(OBJCOPY) -O binary -R .note -R .comment -S compressed/$(LINUX) $@ + $(OBJCOPY) $(OBJCOPYFLAGS) -S compressed/$(LINUX) $@ bootpImage: bootp/bootp - $(OBJCOPY) -O binary -R .note -R .comment -S bootp/bootp $@ + $(OBJCOPY) $(OBJCOPYFLAGS) -S bootp/bootp $@ compressed/$(LINUX): $(LINUX) dep @$(MAKE) -C compressed $(LINUX)arch/frv/include/asm/unistd.h +0
-1@@ -30,7 +30,6 @@#define __ARCH_WANT_SYS_RT_SIGACTION#define __ARCH_WANT_SYS_RT_SIGSUSPEND#define __ARCH_WANT_SYS_EXECVE -#define __ARCH_WANT_KERNEL_EXECVE/* * "Conditional" syscalls arch/frv/kernel/entry.S +3
-25@@ -869,11 +869,6 @@ ret_from_kernel_thread: call schedule_tail calll.p @(gr21,gr0) or gr20,gr20,gr8 - bra sys_exit - - .globl ret_from_kernel_execve -ret_from_kernel_execve: - ori gr28,0,sp bra __syscall_exit ###################################################################################################@@ -1080,27 +1075,10 @@ __entry_return_from_kernel_interrupt: subicc gr5,#0,gr0,icc0 beq icc0,#0,__entry_return_direct -__entry_preempt_need_resched: - ldi @(gr15,#TI_FLAGS),gr4 - andicc gr4,#_TIF_NEED_RESCHED,gr0,icc0 - beq icc0,#1,__entry_return_direct - - setlos #PREEMPT_ACTIVE,gr5 - sti gr5,@(gr15,#TI_FLAGS) - - andi gr23,#~PSR_PIL,gr23 - movgs gr23,psr - - call schedule - sti gr0,@(gr15,#TI_PRE_COUNT) - - movsg psr,gr23 - ori gr23,#PSR_PIL_14,gr23 - movgs gr23,psr - bra __entry_preempt_need_resched -#else - bra __entry_return_direct + subcc gr0,gr0,gr0,icc2 /* set Z and clear C */ + call preempt_schedule_irq #endif + bra __entry_return_direct ###############################################################################arch/frv/kernel/process.c +3
-2@@ -181,6 +181,9 @@ int copy_thread(unsigned long clone_flags, childregs = (struct pt_regs *) (task_stack_page (p) +THREAD_SIZE -FRV_FRAME0_SIZE ); +/* set up the userspace frame (the only place that the USP is stored) */ + *childregs = *__kernel_frame0_ptr; + p->set_child_tid = p->clear_child_tid =NULL ; p->thread.frame = childregs;@@ -191,10 +194,8 @@ int copy_thread(unsigned long clone_flags, p->thread.frame0 = childregs;if (unlikely (!regs)) { -memset (childregs,0 ,sizeof (struct pt_regs )); childregs->gr9 = usp;/* function */ childregs->gr8 = arg; - childregs->psr =PSR_S ; p->thread.pc = (unsigned long ) ret_from_kernel_thread;save_user_regs (p->thread.user);return 0 ;arch/frv/mb93090-mb00/pci-dma-nommu.c +1
-0@@ -11,6 +11,7 @@#include <linux/types.h> #include <linux/slab.h> +#include <linux/export.h> #include <linux/dma-mapping.h> #include <linux/list.h> #include <linux/pci.h> arch/h8300/include/asm/cache.h +2
-1@@ -2,7 +2,8 @@#define __ARCH_H8300_CACHE_H/* bytes per L1 cache line */ -#define L1_CACHE_BYTES 4 +#define L1_CACHE_SHIFT 2 +#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)/* m68k-elf-gcc 2.95.2 doesn't like these */ arch/ia64/mm/init.c +0
-1@@ -637,7 +637,6 @@ mem_init (void) high_memory =__va (max_low_pfn *PAGE_SIZE ); -reset_zone_present_pages ();for_each_online_pgdat (pgdat)if (pgdat->bdata->node_bootmem_map) totalram_pages +=free_all_bootmem_node (pgdat);arch/m68k/include/asm/signal.h +3
-3@@ -41,7 +41,7 @@ struct k_sigaction {static inline void sigaddset (sigset_t *set,int _sig) { asm ("bfset %0{%1,#1}" - :"+od" (*set) + :"+o" (*set) :"id" ((_sig -1 ) ^31 ) :"cc" ); }@@ -49,7 +49,7 @@ static inline void sigaddset(sigset_t *set, int _sig)static inline void sigdelset (sigset_t *set,int _sig) { asm ("bfclr %0{%1,#1}" - :"+od" (*set) + :"+o" (*set) :"id" ((_sig -1 ) ^31 ) :"cc" ); }@@ -65,7 +65,7 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)int ret; asm ("bfextu %1{%2,#1},%0" :"=d" (ret) - :"od" (*set),"id" ((_sig-1 ) ^31 ) + :"o" (*set),"id" ((_sig-1 ) ^31 ) :"cc" );return ret; }arch/mips/cavium-octeon/executive/cvmx-l2c.c deleted +0
-900@@ -1,900 +0,0 @@ -/***********************license start*************** -* Author: Cavium Networks -* -* Contact: [email protected] -* This file is part of the OCTEON SDK -* -* Copyright (c) 2003-2010 Cavium Networks -* -* This file is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License, Version 2, as -* published by the Free Software Foundation. -* -* This file is distributed in the hope that it will be useful, but -* AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty -* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or -* NONINFRINGEMENT. See the GNU General Public License for more -* details. -* -* You should have received a copy of the GNU General Public License -* along with this file; if not, write to the Free Software -* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -* or visit http://www.gnu.org/licenses/. -* -* This file may also be available under a different license from Cavium. -* Contact Cavium Networks for more information -***********************license end**************************************/ - -/* -* Implementation of the Level 2 Cache (L2C) control, -* measurement, and debugging facilities. -*/ - -#include <asm/octeon/cvmx.h> -#include <asm/octeon/cvmx-l2c.h> -#include <asm/octeon/cvmx-spinlock.h> - -/* -* This spinlock is used internally to ensure that only one core is -* performing certain L2 operations at a time. -* -* NOTE: This only protects calls from within a single application - -* if multiple applications or operating systems are running, then it -* is up to the user program to coordinate between them. -*/ -cvmx_spinlock_t cvmx_l2c_spinlock; - -int cvmx_l2c_get_core_way_partition (uint32_t core) -{ -uint32_t field; - -/* Validate the core number */ -if (core >=cvmx_octeon_num_cores ()) -return -1 ; - -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) -return cvmx_read_csr (CVMX_L2C_WPAR_PPX (core)) &0xffff ; - -/* -* Use the lower two bits of the coreNumber to determine the -* bit offset of the UMSK[] field in the L2C_SPAR register. -*/ - field = (core &0x3 ) *8 ; - -/* -* Return the UMSK[] field from the appropriate L2C_SPAR -* register based on the coreNumber. -*/ - -switch (core &0xC ) { -case 0x0 : -return (cvmx_read_csr (CVMX_L2C_SPAR0 ) & (0xFF << field)) >> field; -case 0x4 : -return (cvmx_read_csr (CVMX_L2C_SPAR1 ) & (0xFF << field)) >> field; -case 0x8 : -return (cvmx_read_csr (CVMX_L2C_SPAR2 ) & (0xFF << field)) >> field; -case 0xC : -return (cvmx_read_csr (CVMX_L2C_SPAR3 ) & (0xFF << field)) >> field; - } -return 0 ; -} - -int cvmx_l2c_set_core_way_partition (uint32_t core,uint32_t mask) -{ -uint32_t field; -uint32_t valid_mask; - - valid_mask = (0x1 <<cvmx_l2c_get_num_assoc ()) -1 ; - - mask &= valid_mask; - -/* A UMSK setting which blocks all L2C Ways is an error on some chips */ -if (mask == valid_mask && !OCTEON_IS_MODEL (OCTEON_CN63XX )) -return -1 ; - -/* Validate the core number */ -if (core >=cvmx_octeon_num_cores ()) -return -1 ; - -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -cvmx_write_csr (CVMX_L2C_WPAR_PPX (core), mask); -return 0 ; - } - -/* -* Use the lower two bits of core to determine the bit offset of the -* UMSK[] field in the L2C_SPAR register. -*/ - field = (core &0x3 ) *8 ; - -/* -* Assign the new mask setting to the UMSK[] field in the appropriate -* L2C_SPAR register based on the core_num. -* -*/ -switch (core &0xC ) { -case 0x0 : -cvmx_write_csr (CVMX_L2C_SPAR0 , - (cvmx_read_csr (CVMX_L2C_SPAR0 ) & ~(0xFF << field)) | - mask << field); -break ; -case 0x4 : -cvmx_write_csr (CVMX_L2C_SPAR1 , - (cvmx_read_csr (CVMX_L2C_SPAR1 ) & ~(0xFF << field)) | - mask << field); -break ; -case 0x8 : -cvmx_write_csr (CVMX_L2C_SPAR2 , - (cvmx_read_csr (CVMX_L2C_SPAR2 ) & ~(0xFF << field)) | - mask << field); -break ; -case 0xC : -cvmx_write_csr (CVMX_L2C_SPAR3 , - (cvmx_read_csr (CVMX_L2C_SPAR3 ) & ~(0xFF << field)) | - mask << field); -break ; - } -return 0 ; -} - -int cvmx_l2c_set_hw_way_partition (uint32_t mask) -{ -uint32_t valid_mask; - - valid_mask = (0x1 <<cvmx_l2c_get_num_assoc ()) -1 ; - mask &= valid_mask; - -/* A UMSK setting which blocks all L2C Ways is an error on some chips */ -if (mask == valid_mask && !OCTEON_IS_MODEL (OCTEON_CN63XX )) -return -1 ; - -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) -cvmx_write_csr (CVMX_L2C_WPAR_IOBX (0 ), mask); -else -cvmx_write_csr (CVMX_L2C_SPAR4 , - (cvmx_read_csr (CVMX_L2C_SPAR4 ) & ~0xFF ) | mask); -return 0 ; -} - -int cvmx_l2c_get_hw_way_partition (void ) -{ -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) -return cvmx_read_csr (CVMX_L2C_WPAR_IOBX (0 )) &0xffff ; -else -return cvmx_read_csr (CVMX_L2C_SPAR4 ) & (0xFF ); -} - -void cvmx_l2c_config_perf (uint32_t counter,enum cvmx_l2c_event event, -uint32_t clear_on_read) -{ -if (OCTEON_IS_MODEL (OCTEON_CN5XXX ) ||OCTEON_IS_MODEL (OCTEON_CN3XXX )) { -union cvmx_l2c_pfctl pfctl; - - pfctl.u64 =cvmx_read_csr (CVMX_L2C_PFCTL ); - -switch (counter) { -case 0 : - pfctl.s.cnt0sel = event; - pfctl.s.cnt0ena =1 ; - pfctl.s.cnt0rdclr = clear_on_read; -break ; -case 1 : - pfctl.s.cnt1sel = event; - pfctl.s.cnt1ena =1 ; - pfctl.s.cnt1rdclr = clear_on_read; -break ; -case 2 : - pfctl.s.cnt2sel = event; - pfctl.s.cnt2ena =1 ; - pfctl.s.cnt2rdclr = clear_on_read; -break ; -case 3 : -default : - pfctl.s.cnt3sel = event; - pfctl.s.cnt3ena =1 ; - pfctl.s.cnt3rdclr = clear_on_read; -break ; - } - -cvmx_write_csr (CVMX_L2C_PFCTL , pfctl.u64); - }else { -union cvmx_l2c_tadx_prf l2c_tadx_prf; -int tad; - -cvmx_dprintf ("L2C performance counter events are different for this chip, mapping 'event' to cvmx_l2c_tad_event_t\n" ); -if (clear_on_read) -cvmx_dprintf ("L2C counters don't support clear on read for this chip\n" ); - - l2c_tadx_prf.u64 =cvmx_read_csr (CVMX_L2C_TADX_PRF (0 )); - -switch (counter) { -case 0 : - l2c_tadx_prf.s.cnt0sel = event; -break ; -case 1 : - l2c_tadx_prf.s.cnt1sel = event; -break ; -case 2 : - l2c_tadx_prf.s.cnt2sel = event; -break ; -default : -case 3 : - l2c_tadx_prf.s.cnt3sel = event; -break ; - } -for (tad =0 ; tad <CVMX_L2C_TADS ; tad++) -cvmx_write_csr (CVMX_L2C_TADX_PRF (tad), - l2c_tadx_prf.u64); - } -} - -uint64_t cvmx_l2c_read_perf (uint32_t counter) -{ -switch (counter) { -case 0 : -if (OCTEON_IS_MODEL (OCTEON_CN5XXX ) ||OCTEON_IS_MODEL (OCTEON_CN3XXX )) -return cvmx_read_csr (CVMX_L2C_PFC0 ); -else { -uint64_t counter =0 ; -int tad; -for (tad =0 ; tad <CVMX_L2C_TADS ; tad++) - counter +=cvmx_read_csr (CVMX_L2C_TADX_PFC0 (tad)); -return counter; - } -case 1 : -if (OCTEON_IS_MODEL (OCTEON_CN5XXX ) ||OCTEON_IS_MODEL (OCTEON_CN3XXX )) -return cvmx_read_csr (CVMX_L2C_PFC1 ); -else { -uint64_t counter =0 ; -int tad; -for (tad =0 ; tad <CVMX_L2C_TADS ; tad++) - counter +=cvmx_read_csr (CVMX_L2C_TADX_PFC1 (tad)); -return counter; - } -case 2 : -if (OCTEON_IS_MODEL (OCTEON_CN5XXX ) ||OCTEON_IS_MODEL (OCTEON_CN3XXX )) -return cvmx_read_csr (CVMX_L2C_PFC2 ); -else { -uint64_t counter =0 ; -int tad; -for (tad =0 ; tad <CVMX_L2C_TADS ; tad++) - counter +=cvmx_read_csr (CVMX_L2C_TADX_PFC2 (tad)); -return counter; - } -case 3 : -default : -if (OCTEON_IS_MODEL (OCTEON_CN5XXX ) ||OCTEON_IS_MODEL (OCTEON_CN3XXX )) -return cvmx_read_csr (CVMX_L2C_PFC3 ); -else { -uint64_t counter =0 ; -int tad; -for (tad =0 ; tad <CVMX_L2C_TADS ; tad++) - counter +=cvmx_read_csr (CVMX_L2C_TADX_PFC3 (tad)); -return counter; - } - } -} - -/** -* @INTERNAL -* Helper function use to fault in cache lines for L2 cache locking -* -* @addr: Address of base of memory region to read into L2 cache -* @len: Length (in bytes) of region to fault in -*/ -static void fault_in (uint64_t addr,int len) -{ -volatile char *ptr; -volatile char dummy; -/* -* Adjust addr and length so we get all cache lines even for -* small ranges spanning two cache lines. -*/ - len += addr &CVMX_CACHE_LINE_MASK ; - addr &= ~CVMX_CACHE_LINE_MASK ; - ptr = (volatile char *)cvmx_phys_to_ptr (addr); -/* -* Invalidate L1 cache to make sure all loads result in data -* being in L2. -*/ -CVMX_DCACHE_INVALIDATE ; -while (len >0 ) { - dummy += *ptr; - len -=CVMX_CACHE_LINE_SIZE ; - ptr +=CVMX_CACHE_LINE_SIZE ; - } -} - -int cvmx_l2c_lock_line (uint64_t addr) -{ -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -int shift =CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ; -uint64_t assoc =cvmx_l2c_get_num_assoc (); -uint64_t tag = addr >> shift; -uint64_t index =CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS ,cvmx_l2c_address_to_index (addr) <<CVMX_L2C_IDX_ADDR_SHIFT ); -uint64_t way; -union cvmx_l2c_tadx_tag l2c_tadx_tag; - -CVMX_CACHE_LCKL2 (CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , addr),0 ); - -/* Make sure we were able to lock the line */ -for (way =0 ; way < assoc; way++) { -CVMX_CACHE_LTGL2I (index | (way << shift),0 ); -/* make sure CVMX_L2C_TADX_TAG is updated */ -CVMX_SYNC ; - l2c_tadx_tag.u64 =cvmx_read_csr (CVMX_L2C_TADX_TAG (0 )); -if (l2c_tadx_tag.s.valid && l2c_tadx_tag.s.tag == tag) -break ; - } - -/* Check if a valid line is found */ -if (way >= assoc) { -/* cvmx_dprintf("ERROR: cvmx_l2c_lock_line: line not found for locking at 0x%llx address\n", (unsigned long long)addr); */ -return -1 ; - } - -/* Check if lock bit is not set */ -if (!l2c_tadx_tag.s.lock) { -/* cvmx_dprintf("ERROR: cvmx_l2c_lock_line: Not able to lock at 0x%llx address\n", (unsigned long long)addr); */ -return -1 ; - } -return way; - }else { -int retval =0 ; -union cvmx_l2c_dbg l2cdbg; -union cvmx_l2c_lckbase lckbase; -union cvmx_l2c_lckoff lckoff; -union cvmx_l2t_err l2t_err; - -cvmx_spinlock_lock (&cvmx_l2c_spinlock); - - l2cdbg.u64 =0 ; - lckbase.u64 =0 ; - lckoff.u64 =0 ; - -/* Clear l2t error bits if set */ - l2t_err.u64 =cvmx_read_csr (CVMX_L2T_ERR ); - l2t_err.s.lckerr =1 ; - l2t_err.s.lckerr2 =1 ; -cvmx_write_csr (CVMX_L2T_ERR , l2t_err.u64); - - addr &= ~CVMX_CACHE_LINE_MASK ; - -/* Set this core as debug core */ - l2cdbg.s.ppnum =cvmx_get_core_num (); -CVMX_SYNC ; -cvmx_write_csr (CVMX_L2C_DBG , l2cdbg.u64); -cvmx_read_csr (CVMX_L2C_DBG ); - - lckoff.s.lck_offset =0 ;/* Only lock 1 line at a time */ -cvmx_write_csr (CVMX_L2C_LCKOFF , lckoff.u64); -cvmx_read_csr (CVMX_L2C_LCKOFF ); - -if (((union cvmx_l2c_cfg )(cvmx_read_csr (CVMX_L2C_CFG ))).s.idxalias) { -int alias_shift =CVMX_L2C_IDX_ADDR_SHIFT +2 *CVMX_L2_SET_BITS -1 ; -uint64_t addr_tmp = addr ^ (addr & ((1 << alias_shift) -1 )) >>CVMX_L2_SET_BITS ; - lckbase.s.lck_base = addr_tmp >>7 ; - }else { - lckbase.s.lck_base = addr >>7 ; - } - - lckbase.s.lck_ena =1 ; -cvmx_write_csr (CVMX_L2C_LCKBASE , lckbase.u64); -/* Make sure it gets there */ -cvmx_read_csr (CVMX_L2C_LCKBASE ); - -fault_in (addr,CVMX_CACHE_LINE_SIZE ); - - lckbase.s.lck_ena =0 ; -cvmx_write_csr (CVMX_L2C_LCKBASE , lckbase.u64); -/* Make sure it gets there */ -cvmx_read_csr (CVMX_L2C_LCKBASE ); - -/* Stop being debug core */ -cvmx_write_csr (CVMX_L2C_DBG ,0 ); -cvmx_read_csr (CVMX_L2C_DBG ); - - l2t_err.u64 =cvmx_read_csr (CVMX_L2T_ERR ); -if (l2t_err.s.lckerr || l2t_err.s.lckerr2) - retval =1 ;/* We were unable to lock the line */ - -cvmx_spinlock_unlock (&cvmx_l2c_spinlock); -return retval; - } -} - -int cvmx_l2c_lock_mem_region (uint64_t start,uint64_t len) -{ -int retval =0 ; - -/* Round start/end to cache line boundaries */ - len += start &CVMX_CACHE_LINE_MASK ; - start &= ~CVMX_CACHE_LINE_MASK ; - len = (len +CVMX_CACHE_LINE_MASK ) & ~CVMX_CACHE_LINE_MASK ; - -while (len) { - retval +=cvmx_l2c_lock_line (start); - start +=CVMX_CACHE_LINE_SIZE ; - len -=CVMX_CACHE_LINE_SIZE ; - } -return retval; -} - -void cvmx_l2c_flush (void ) -{ -uint64_t assoc, set; -uint64_t n_assoc, n_set; - - n_set =cvmx_l2c_get_num_sets (); - n_assoc =cvmx_l2c_get_num_assoc (); - -if (OCTEON_IS_MODEL (OCTEON_CN6XXX )) { -uint64_t address; -/* These may look like constants, but they aren't... */ -int assoc_shift =CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ; -int set_shift =CVMX_L2C_IDX_ADDR_SHIFT ; -for (set =0 ; set < n_set; set++) { -for (assoc =0 ; assoc < n_assoc; assoc++) { - address =CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , - (assoc << assoc_shift) | (set << set_shift)); -CVMX_CACHE_WBIL2I (address,0 ); - } - } - }else { -for (set =0 ; set < n_set; set++) -for (assoc =0 ; assoc < n_assoc; assoc++) -cvmx_l2c_flush_line (assoc, set); - } -} - - -int cvmx_l2c_unlock_line (uint64_t address) -{ - -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -int assoc; -union cvmx_l2c_tag tag; -uint32_t tag_addr; -uint32_t index =cvmx_l2c_address_to_index (address); - - tag_addr = ((address >>CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) & ((1 <<CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) -1 )); - -/* -* For 63XX, we can flush a line by using the physical -* address directly, so finding the cache line used by -* the address is only required to provide the proper -* return value for the function. -*/ -for (assoc =0 ; assoc <CVMX_L2_ASSOC ; assoc++) { - tag =cvmx_l2c_get_tag (assoc, index); - -if (tag.s.V && (tag.s.addr == tag_addr)) { -CVMX_CACHE_WBIL2 (CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , address),0 ); -return tag.s.L; - } - } - }else { -int assoc; -union cvmx_l2c_tag tag; -uint32_t tag_addr; - -uint32_t index =cvmx_l2c_address_to_index (address); - -/* Compute portion of address that is stored in tag */ - tag_addr = ((address >>CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) & ((1 <<CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) -1 )); -for (assoc =0 ; assoc <CVMX_L2_ASSOC ; assoc++) { - tag =cvmx_l2c_get_tag (assoc, index); - -if (tag.s.V && (tag.s.addr == tag_addr)) { -cvmx_l2c_flush_line (assoc, index); -return tag.s.L; - } - } - } -return 0 ; -} - -int cvmx_l2c_unlock_mem_region (uint64_t start,uint64_t len) -{ -int num_unlocked =0 ; -/* Round start/end to cache line boundaries */ - len += start &CVMX_CACHE_LINE_MASK ; - start &= ~CVMX_CACHE_LINE_MASK ; - len = (len +CVMX_CACHE_LINE_MASK ) & ~CVMX_CACHE_LINE_MASK ; -while (len >0 ) { - num_unlocked +=cvmx_l2c_unlock_line (start); - start +=CVMX_CACHE_LINE_SIZE ; - len -=CVMX_CACHE_LINE_SIZE ; - } - -return num_unlocked; -} - -/* -* Internal l2c tag types. These are converted to a generic structure -* that can be used on all chips. -*/ -union __cvmx_l2c_tag { -uint64_t u64; -struct cvmx_l2c_tag_cn50xx { -uint64_t reserved:40 ; -uint64_t V:1 ;/* Line valid */ -uint64_t D:1 ;/* Line dirty */ -uint64_t L:1 ;/* Line locked */ -uint64_t U:1 ;/* Use, LRU eviction */ -uint64_t addr:20 ;/* Phys mem addr (33..14) */ - } cn50xx; -struct cvmx_l2c_tag_cn30xx { -uint64_t reserved:41 ; -uint64_t V:1 ;/* Line valid */ -uint64_t D:1 ;/* Line dirty */ -uint64_t L:1 ;/* Line locked */ -uint64_t U:1 ;/* Use, LRU eviction */ -uint64_t addr:19 ;/* Phys mem addr (33..15) */ - } cn30xx; -struct cvmx_l2c_tag_cn31xx { -uint64_t reserved:42 ; -uint64_t V:1 ;/* Line valid */ -uint64_t D:1 ;/* Line dirty */ -uint64_t L:1 ;/* Line locked */ -uint64_t U:1 ;/* Use, LRU eviction */ -uint64_t addr:18 ;/* Phys mem addr (33..16) */ - } cn31xx; -struct cvmx_l2c_tag_cn38xx { -uint64_t reserved:43 ; -uint64_t V:1 ;/* Line valid */ -uint64_t D:1 ;/* Line dirty */ -uint64_t L:1 ;/* Line locked */ -uint64_t U:1 ;/* Use, LRU eviction */ -uint64_t addr:17 ;/* Phys mem addr (33..17) */ - } cn38xx; -struct cvmx_l2c_tag_cn58xx { -uint64_t reserved:44 ; -uint64_t V:1 ;/* Line valid */ -uint64_t D:1 ;/* Line dirty */ -uint64_t L:1 ;/* Line locked */ -uint64_t U:1 ;/* Use, LRU eviction */ -uint64_t addr:16 ;/* Phys mem addr (33..18) */ - } cn58xx; -struct cvmx_l2c_tag_cn58xx cn56xx;/* 2048 sets */ -struct cvmx_l2c_tag_cn31xx cn52xx;/* 512 sets */ -}; - - -/** -* @INTERNAL -* Function to read a L2C tag. This code make the current core -* the 'debug core' for the L2. This code must only be executed by -* 1 core at a time. -* -* @assoc: Association (way) of the tag to dump -* @index: Index of the cacheline -* -* Returns The Octeon model specific tag structure. This is -* translated by a wrapper function to a generic form that is -* easier for applications to use. -*/ -static union __cvmx_l2c_tag __read_l2_tag (uint64_t assoc,uint64_t index) -{ - -uint64_t debug_tag_addr =CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , (index <<7 ) +96 ); -uint64_t core =cvmx_get_core_num (); -union __cvmx_l2c_tag tag_val; -uint64_t dbg_addr =CVMX_L2C_DBG ; -unsigned long flags; - -union cvmx_l2c_dbg debug_val; - debug_val.u64 =0 ; -/* -* For low core count parts, the core number is always small -* enough to stay in the correct field and not set any -* reserved bits. -*/ - debug_val.s.ppnum = core; - debug_val.s.l2t =1 ; - debug_val.s.set = assoc; - -local_irq_save (flags); -/* -* Make sure core is quiet (no prefetches, etc.) before -* entering debug mode. -*/ -CVMX_SYNC ; -/* Flush L1 to make sure debug load misses L1 */ -CVMX_DCACHE_INVALIDATE ; - -/* -* The following must be done in assembly as when in debug -* mode all data loads from L2 return special debug data, not -* normal memory contents. Also, interrupts must be disabled, -* since if an interrupt occurs while in debug mode the ISR -* will get debug data from all its memory * reads instead of -* the contents of memory. -*/ - - asmvolatile ( -".set push\n\t" -".set mips64\n\t" -".set noreorder\n\t" -"sd %[dbg_val], 0(%[dbg_addr])\n\t" /* Enter debug mode, wait for store */ -"ld $0, 0(%[dbg_addr])\n\t" -"ld %[tag_val], 0(%[tag_addr])\n\t" /* Read L2C tag data */ -"sd $0, 0(%[dbg_addr])\n\t" /* Exit debug mode, wait for store */ -"ld $0, 0(%[dbg_addr])\n\t" -"cache 9, 0($0)\n\t" /* Invalidate dcache to discard debug data */ -".set pop" - : [tag_val]"=r" (tag_val) - : [dbg_addr]"r" (dbg_addr), [dbg_val]"r" (debug_val), [tag_addr]"r" (debug_tag_addr) - :"memory" ); - -local_irq_restore (flags); - -return tag_val; -} - - -union cvmx_l2c_tag cvmx_l2c_get_tag (uint32_t association,uint32_t index) -{ -union cvmx_l2c_tag tag; - tag.u64 =0 ; - -if ((int )association >=cvmx_l2c_get_num_assoc ()) { -cvmx_dprintf ("ERROR: cvmx_l2c_get_tag association out of range\n" ); -return tag; - } -if ((int )index >=cvmx_l2c_get_num_sets ()) { -cvmx_dprintf ("ERROR: cvmx_l2c_get_tag index out of range (arg: %d, max: %d)\n" , - (int )index,cvmx_l2c_get_num_sets ()); -return tag; - } -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -union cvmx_l2c_tadx_tag l2c_tadx_tag; -uint64_t address =CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , - (association <<CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) | - (index <<CVMX_L2C_IDX_ADDR_SHIFT )); -/* -* Use L2 cache Index load tag cache instruction, as -* hardware loads the virtual tag for the L2 cache -* block with the contents of L2C_TAD0_TAG -* register. -*/ -CVMX_CACHE_LTGL2I (address,0 ); -CVMX_SYNC ;/* make sure CVMX_L2C_TADX_TAG is updated */ - l2c_tadx_tag.u64 =cvmx_read_csr (CVMX_L2C_TADX_TAG (0 )); - - tag.s.V = l2c_tadx_tag.s.valid; - tag.s.D = l2c_tadx_tag.s.dirty; - tag.s.L = l2c_tadx_tag.s.lock; - tag.s.U = l2c_tadx_tag.s.use; - tag.s.addr = l2c_tadx_tag.s.tag; - }else { -union __cvmx_l2c_tag tmp_tag; -/* __read_l2_tag is intended for internal use only */ - tmp_tag =__read_l2_tag (association, index); - -/* -* Convert all tag structure types to generic version, -* as it can represent all models. -*/ -if (OCTEON_IS_MODEL (OCTEON_CN58XX ) ||OCTEON_IS_MODEL (OCTEON_CN56XX )) { - tag.s.V = tmp_tag.cn58xx.V; - tag.s.D = tmp_tag.cn58xx.D; - tag.s.L = tmp_tag.cn58xx.L; - tag.s.U = tmp_tag.cn58xx.U; - tag.s.addr = tmp_tag.cn58xx.addr; - }else if (OCTEON_IS_MODEL (OCTEON_CN38XX )) { - tag.s.V = tmp_tag.cn38xx.V; - tag.s.D = tmp_tag.cn38xx.D; - tag.s.L = tmp_tag.cn38xx.L; - tag.s.U = tmp_tag.cn38xx.U; - tag.s.addr = tmp_tag.cn38xx.addr; - }else if (OCTEON_IS_MODEL (OCTEON_CN31XX ) ||OCTEON_IS_MODEL (OCTEON_CN52XX )) { - tag.s.V = tmp_tag.cn31xx.V; - tag.s.D = tmp_tag.cn31xx.D; - tag.s.L = tmp_tag.cn31xx.L; - tag.s.U = tmp_tag.cn31xx.U; - tag.s.addr = tmp_tag.cn31xx.addr; - }else if (OCTEON_IS_MODEL (OCTEON_CN30XX )) { - tag.s.V = tmp_tag.cn30xx.V; - tag.s.D = tmp_tag.cn30xx.D; - tag.s.L = tmp_tag.cn30xx.L; - tag.s.U = tmp_tag.cn30xx.U; - tag.s.addr = tmp_tag.cn30xx.addr; - }else if (OCTEON_IS_MODEL (OCTEON_CN50XX )) { - tag.s.V = tmp_tag.cn50xx.V; - tag.s.D = tmp_tag.cn50xx.D; - tag.s.L = tmp_tag.cn50xx.L; - tag.s.U = tmp_tag.cn50xx.U; - tag.s.addr = tmp_tag.cn50xx.addr; - }else { -cvmx_dprintf ("Unsupported OCTEON Model in %s\n" , __func__); - } - } -return tag; -} - -uint32_t cvmx_l2c_address_to_index (uint64_t addr) -{ -uint64_t idx = addr >>CVMX_L2C_IDX_ADDR_SHIFT ; -int indxalias =0 ; - -if (OCTEON_IS_MODEL (OCTEON_CN6XXX )) { -union cvmx_l2c_ctl l2c_ctl; - l2c_ctl.u64 =cvmx_read_csr (CVMX_L2C_CTL ); - indxalias = !l2c_ctl.s.disidxalias; - }else { -union cvmx_l2c_cfg l2c_cfg; - l2c_cfg.u64 =cvmx_read_csr (CVMX_L2C_CFG ); - indxalias = l2c_cfg.s.idxalias; - } - -if (indxalias) { -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -uint32_t a_14_12 = (idx / (CVMX_L2C_MEMBANK_SELECT_SIZE /(1 <<CVMX_L2C_IDX_ADDR_SHIFT ))) &0x7 ; - idx ^= idx /cvmx_l2c_get_num_sets (); - idx ^= a_14_12; - }else { - idx ^= ((addr &CVMX_L2C_ALIAS_MASK ) >>CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ); - } - } - idx &=CVMX_L2C_IDX_MASK ; -return idx; -} - -int cvmx_l2c_get_cache_size_bytes (void ) -{ -return cvmx_l2c_get_num_sets () *cvmx_l2c_get_num_assoc () * -CVMX_CACHE_LINE_SIZE ; -} - -/** -* Return log base 2 of the number of sets in the L2 cache -* Returns -*/ -int cvmx_l2c_get_set_bits (void ) -{ -int l2_set_bits; -if (OCTEON_IS_MODEL (OCTEON_CN56XX ) ||OCTEON_IS_MODEL (OCTEON_CN58XX )) - l2_set_bits =11 ;/* 2048 sets */ -else if (OCTEON_IS_MODEL (OCTEON_CN38XX ) ||OCTEON_IS_MODEL (OCTEON_CN63XX )) - l2_set_bits =10 ;/* 1024 sets */ -else if (OCTEON_IS_MODEL (OCTEON_CN31XX ) ||OCTEON_IS_MODEL (OCTEON_CN52XX )) - l2_set_bits =9 ;/* 512 sets */ -else if (OCTEON_IS_MODEL (OCTEON_CN30XX )) - l2_set_bits =8 ;/* 256 sets */ -else if (OCTEON_IS_MODEL (OCTEON_CN50XX )) - l2_set_bits =7 ;/* 128 sets */ -else { -cvmx_dprintf ("Unsupported OCTEON Model in %s\n" , __func__); - l2_set_bits =11 ;/* 2048 sets */ - } -return l2_set_bits; -} - -/* Return the number of sets in the L2 Cache */ -int cvmx_l2c_get_num_sets (void ) -{ -return 1 <<cvmx_l2c_get_set_bits (); -} - -/* Return the number of associations in the L2 Cache */ -int cvmx_l2c_get_num_assoc (void ) -{ -int l2_assoc; -if (OCTEON_IS_MODEL (OCTEON_CN56XX ) || -OCTEON_IS_MODEL (OCTEON_CN52XX ) || -OCTEON_IS_MODEL (OCTEON_CN58XX ) || -OCTEON_IS_MODEL (OCTEON_CN50XX ) || -OCTEON_IS_MODEL (OCTEON_CN38XX )) - l2_assoc =8 ; -else if (OCTEON_IS_MODEL (OCTEON_CN63XX )) - l2_assoc =16 ; -else if (OCTEON_IS_MODEL (OCTEON_CN31XX ) || -OCTEON_IS_MODEL (OCTEON_CN30XX )) - l2_assoc =4 ; -else { -cvmx_dprintf ("Unsupported OCTEON Model in %s\n" , __func__); - l2_assoc =8 ; - } - -/* Check to see if part of the cache is disabled */ -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -union cvmx_mio_fus_dat3 mio_fus_dat3; - - mio_fus_dat3.u64 =cvmx_read_csr (CVMX_MIO_FUS_DAT3 ); -/* -* cvmx_mio_fus_dat3.s.l2c_crip fuses map as follows -* <2> will be not used for 63xx -* <1> disables 1/2 ways -* <0> disables 1/4 ways -* They are cumulative, so for 63xx: -* <1> <0> -* 0 0 16-way 2MB cache -* 0 1 12-way 1.5MB cache -* 1 0 8-way 1MB cache -* 1 1 4-way 512KB cache -*/ - -if (mio_fus_dat3.s.l2c_crip ==3 ) - l2_assoc =4 ; -else if (mio_fus_dat3.s.l2c_crip ==2 ) - l2_assoc =8 ; -else if (mio_fus_dat3.s.l2c_crip ==1 ) - l2_assoc =12 ; - }else { -union cvmx_l2d_fus3 val; - val.u64 =cvmx_read_csr (CVMX_L2D_FUS3 ); -/* -* Using shifts here, as bit position names are -* different for each model but they all mean the -* same. -*/ -if ((val.u64 >>35 ) &0x1 ) - l2_assoc = l2_assoc >>2 ; -else if ((val.u64 >>34 ) &0x1 ) - l2_assoc = l2_assoc >>1 ; - } -return l2_assoc; -} - -/** -* Flush a line from the L2 cache -* This should only be called from one core at a time, as this routine -* sets the core to the 'debug' core in order to flush the line. -* -* @assoc: Association (or way) to flush -* @index: Index to flush -*/ -void cvmx_l2c_flush_line (uint32_t assoc,uint32_t index) -{ -/* Check the range of the index. */ -if (index > (uint32_t )cvmx_l2c_get_num_sets ()) { -cvmx_dprintf ("ERROR: cvmx_l2c_flush_line index out of range.\n" ); -return ; - } - -/* Check the range of association. */ -if (assoc > (uint32_t )cvmx_l2c_get_num_assoc ()) { -cvmx_dprintf ("ERROR: cvmx_l2c_flush_line association out of range.\n" ); -return ; - } - -if (OCTEON_IS_MODEL (OCTEON_CN63XX )) { -uint64_t address; -/* Create the address based on index and association. -* Bits<20:17> select the way of the cache block involved in -* the operation -* Bits<16:7> of the effect address select the index -*/ - address =CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , - (assoc <<CVMX_L2C_TAG_ADDR_ALIAS_SHIFT ) | - (index <<CVMX_L2C_IDX_ADDR_SHIFT )); -CVMX_CACHE_WBIL2I (address,0 ); - }else { -union cvmx_l2c_dbg l2cdbg; - - l2cdbg.u64 =0 ; -if (!OCTEON_IS_MODEL (OCTEON_CN30XX )) - l2cdbg.s.ppnum =cvmx_get_core_num (); - l2cdbg.s.finv =1 ; - - l2cdbg.s.set = assoc; -cvmx_spinlock_lock (&cvmx_l2c_spinlock); -/* -* Enter debug mode, and make sure all other writes -* complete before we enter debug mode -*/ -CVMX_SYNC ; -cvmx_write_csr (CVMX_L2C_DBG , l2cdbg.u64); -cvmx_read_csr (CVMX_L2C_DBG ); - -CVMX_PREPARE_FOR_STORE (CVMX_ADD_SEG (CVMX_MIPS_SPACE_XKPHYS , - index *CVMX_CACHE_LINE_SIZE ), -0 ); -/* Exit debug mode */ -CVMX_SYNC ; -cvmx_write_csr (CVMX_L2C_DBG ,0 ); -cvmx_read_csr (CVMX_L2C_DBG ); -cvmx_spinlock_unlock (&cvmx_l2c_spinlock); - } -}arch/unicore32/include/asm/byteorder.h deleted +0
-24@@ -1,24 +0,0 @@ -/* -* linux/arch/unicore32/include/asm/byteorder.h -* -* Code specific to PKUnity SoC and UniCore ISA -* -* Copyright (C) 2001-2010 GUAN Xue-tao -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* UniCore ONLY support Little Endian mode, the data bus is connected such -* that byte accesses appear as: -* 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31 -* and word accesses (data or instruction) appear as: -* d0...d31 -*/ -#ifndef __UNICORE_BYTEORDER_H__ -#define __UNICORE_BYTEORDER_H__ - -#include <linux/byteorder/little_endian.h> - -#endif -arch/unicore32/include/asm/kvm_para.h deleted +0
-1@@ -1 +0,0 @@ -#include <asm-generic/kvm_para.h> arch/unicore32/include/asm/sigcontext.h deleted +0
-29@@ -1,29 +0,0 @@ -/* -* linux/arch/unicore32/include/asm/sigcontext.h -* -* Code specific to PKUnity SoC and UniCore ISA -* -* Copyright (C) 2001-2010 GUAN Xue-tao -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ -#ifndef __UNICORE_SIGCONTEXT_H__ -#define __UNICORE_SIGCONTEXT_H__ - -#include <asm/ptrace.h> -/* -* Signal context structure - contains all info to do with the state -* before the signal handler was invoked. Note: only add new entries -* to the end of the structure. -*/ -struct sigcontext { -unsigned long trap_no; -unsigned long error_code; -unsigned long oldmask; -unsigned long fault_address; -struct pt_regs regs; -}; - -#endif arch/unicore32/include/asm/unistd.h deleted +0
-14@@ -1,14 +0,0 @@ -/* -* linux/arch/unicore32/include/asm/unistd.h -* -* Code specific to PKUnity SoC and UniCore ISA -* -* Copyright (C) 2001-2010 GUAN Xue-tao -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -/* Use the standard ABI for syscalls. */ -#include <asm-generic/unistd.h> arch/x86/kvm/x86.c +6
-0@@ -5938,6 +5938,12 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,return 0 ; } +int kvm_arch_vcpu_ioctl_set_entitlement (struct kvm_vcpu *vcpu,long entitlement) +{ + vcpu->arch.consigned_limit = entitlement; +return 0 ; +} +int kvm_arch_vcpu_ioctl_get_fpu (struct kvm_vcpu *vcpu,struct kvm_fpu *fpu) { struct i387_fxsave_struct *fxsave =include/linux/kvm_host.h +2
-0@@ -590,6 +590,8 @@ void kvm_arch_hardware_unsetup(void);void kvm_arch_check_processor_compat (void *rtn);int kvm_arch_vcpu_runnable (struct kvm_vcpu *vcpu);int kvm_arch_vcpu_should_kick (struct kvm_vcpu *vcpu); +int kvm_arch_vcpu_ioctl_set_entitlement (struct kvm_vcpu *vcpu, +long entitlement);void kvm_free_physmem (struct kvm *kvm);include/linux/raid/md_p.h deleted +0
-301@@ -1,301 +0,0 @@ -/* -md_p.h : physical layout of Linux RAID devices -Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman -- This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -You should have received a copy of the GNU General Public License -(for example /usr/src/linux/COPYING); if not, write to the Free -Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef _MD_P_H -#define _MD_P_H - -#include <linux/types.h> - -/* -* RAID superblock. -* -* The RAID superblock maintains some statistics on each RAID configuration. -* Each real device in the RAID set contains it near the end of the device. -* Some of the ideas are copied from the ext2fs implementation. -* -* We currently use 4096 bytes as follows: -* -* word offset function -* -* 0 - 31 Constant generic RAID device information. -* 32 - 63 Generic state information. -* 64 - 127 Personality specific information. -* 128 - 511 12 32-words descriptors of the disks in the raid set. -* 512 - 911 Reserved. -* 912 - 1023 Disk specific descriptor. -*/ - -/* -* If x is the real device size in bytes, we return an apparent size of: -* -* y = (x & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES -* -* and place the 4kB superblock at offset y. -*/ -#define MD_RESERVED_BYTES (64 * 1024) -#define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512) - -#define MD_NEW_SIZE_SECTORS (x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS) - -#define MD_SB_BYTES 4096 -#define MD_SB_WORDS (MD_SB_BYTES / 4) -#define MD_SB_SECTORS (MD_SB_BYTES / 512) - -/* -* The following are counted in 32-bit words -*/ -#define MD_SB_GENERIC_OFFSET 0 -#define MD_SB_PERSONALITY_OFFSET 64 -#define MD_SB_DISKS_OFFSET 128 -#define MD_SB_DESCRIPTOR_OFFSET 992 - -#define MD_SB_GENERIC_CONSTANT_WORDS 32 -#define MD_SB_GENERIC_STATE_WORDS 32 -#define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS) -#define MD_SB_PERSONALITY_WORDS 64 -#define MD_SB_DESCRIPTOR_WORDS 32 -#define MD_SB_DISKS 27 -#define MD_SB_DISKS_WORDS (MD_SB_DISKS*MD_SB_DESCRIPTOR_WORDS) -#define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS) -#define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS) - -/* -* Device "operational" state bits -*/ -#define MD_DISK_FAULTY 0/* disk is faulty / operational */ -#define MD_DISK_ACTIVE 1/* disk is running or spare disk */ -#define MD_DISK_SYNC 2/* disk is in sync with the raid set */ -#define MD_DISK_REMOVED 3/* disk is in sync with the raid set */ - -#define MD_DISK_WRITEMOSTLY 9/* disk is "write-mostly" is RAID1 config. -* read requests will only be sent here in -* dire need -*/ - -typedef struct mdp_device_descriptor_s { -__u32 number;/* 0 Device number in the entire set */ -__u32 major;/* 1 Device major number */ -__u32 minor;/* 2 Device minor number */ -__u32 raid_disk;/* 3 The role of the device in the raid set */ -__u32 state;/* 4 Operational state */ -__u32 reserved[MD_SB_DESCRIPTOR_WORDS -5 ]; -}mdp_disk_t ; - -#define MD_SB_MAGIC 0xa92b4efc - -/* -* Superblock state bits -*/ -#define MD_SB_CLEAN 0 -#define MD_SB_ERRORS 1 - -#define MD_SB_BITMAP_PRESENT 8/* bitmap may be present nearby */ - -/* -* Notes: -* - if an array is being reshaped (restriped) in order to change the -* the number of active devices in the array, 'raid_disks' will be -* the larger of the old and new numbers. 'delta_disks' will -* be the "new - old". So if +ve, raid_disks is the new value, and -* "raid_disks-delta_disks" is the old. If -ve, raid_disks is the -* old value and "raid_disks+delta_disks" is the new (smaller) value. -*/ - - -typedef struct mdp_superblock_s { -/* -* Constant generic information -*/ -__u32 md_magic;/* 0 MD identifier */ -__u32 major_version;/* 1 major version to which the set conforms */ -__u32 minor_version;/* 2 minor version ... */ -__u32 patch_version;/* 3 patchlevel version ... */ -__u32 gvalid_words;/* 4 Number of used words in this section */ -__u32 set_uuid0;/* 5 Raid set identifier */ -__u32 ctime;/* 6 Creation time */ -__u32 level;/* 7 Raid personality */ -__u32 size;/* 8 Apparent size of each individual disk */ -__u32 nr_disks;/* 9 total disks in the raid set */ -__u32 raid_disks;/* 10 disks in a fully functional raid set */ -__u32 md_minor;/* 11 preferred MD minor device number */ -__u32 not_persistent;/* 12 does it have a persistent superblock */ -__u32 set_uuid1;/* 13 Raid set identifier #2 */ -__u32 set_uuid2;/* 14 Raid set identifier #3 */ -__u32 set_uuid3;/* 15 Raid set identifier #4 */ -__u32 gstate_creserved[MD_SB_GENERIC_CONSTANT_WORDS -16 ]; - -/* -* Generic state information -*/ -__u32 utime;/* 0 Superblock update time */ -__u32 state;/* 1 State bits (clean, ...) */ -__u32 active_disks;/* 2 Number of currently active disks */ -__u32 working_disks;/* 3 Number of working disks */ -__u32 failed_disks;/* 4 Number of failed disks */ -__u32 spare_disks;/* 5 Number of spare disks */ -__u32 sb_csum;/* 6 checksum of the whole superblock */ -#ifdef __BIG_ENDIAN -__u32 events_hi;/* 7 high-order of superblock update count */ -__u32 events_lo;/* 8 low-order of superblock update count */ -__u32 cp_events_hi;/* 9 high-order of checkpoint update count */ -__u32 cp_events_lo;/* 10 low-order of checkpoint update count */ -#else -__u32 events_lo;/* 7 low-order of superblock update count */ -__u32 events_hi;/* 8 high-order of superblock update count */ -__u32 cp_events_lo;/* 9 low-order of checkpoint update count */ -__u32 cp_events_hi;/* 10 high-order of checkpoint update count */ -#endif -__u32 recovery_cp;/* 11 recovery checkpoint sector count */ -/* There are only valid for minor_version > 90 */ -__u64 reshape_position;/* 12,13 next address in array-space for reshape */ -__u32 new_level;/* 14 new level we are reshaping to */ -__u32 delta_disks;/* 15 change in number of raid_disks */ -__u32 new_layout;/* 16 new layout */ -__u32 new_chunk;/* 17 new chunk size (bytes) */ -__u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS -18 ]; - -/* -* Personality information -*/ -__u32 layout;/* 0 the array's physical layout */ -__u32 chunk_size;/* 1 chunk size in bytes */ -__u32 root_pv;/* 2 LV root PV */ -__u32 root_block;/* 3 LV root block */ -__u32 pstate_reserved[MD_SB_PERSONALITY_WORDS -4 ]; - -/* -* Disks information -*/ -mdp_disk_t disks[MD_SB_DISKS ]; - -/* -* Reserved -*/ -__u32 reserved[MD_SB_RESERVED_WORDS ]; - -/* -* Active descriptor -*/ -mdp_disk_t this_disk; - -}mdp_super_t ; - -static inline __u64 md_event (mdp_super_t *sb) { -__u64 ev = sb->events_hi; -return (ev<<32 )| sb->events_lo; -} - -#define MD_SUPERBLOCK_1_TIME_SEC_MASK ((1ULL<<40) - 1) - -/* -* The version-1 superblock : -* All numeric fields are little-endian. -* -* total size: 256 bytes plus 2 per device. -* 1K allows 384 devices. -*/ -struct mdp_superblock_1 { -/* constant array information - 128 bytes */ -__le32 magic;/* MD_SB_MAGIC: 0xa92b4efc - little endian */ -__le32 major_version;/* 1 */ -__le32 feature_map;/* bit 0 set if 'bitmap_offset' is meaningful */ -__le32 pad0;/* always set to 0 when writing */ - -__u8 set_uuid[16 ];/* user-space generated. */ -char set_name[32 ];/* set and interpreted by user-space */ - -__le64 ctime;/* lo 40 bits are seconds, top 24 are microseconds or 0*/ -__le32 level;/* -4 (multipath), -1 (linear), 0,1,4,5 */ -__le32 layout;/* only for raid5 and raid10 currently */ -__le64 size;/* used size of component devices, in 512byte sectors */ - -__le32 chunksize;/* in 512byte sectors */ -__le32 raid_disks; -__le32 bitmap_offset;/* sectors after start of superblock that bitmap starts -* NOTE: signed, so bitmap can be before superblock -* only meaningful of feature_map[0] is set. -*/ - -/* These are only valid with feature bit '4' */ -__le32 new_level;/* new level we are reshaping to */ -__le64 reshape_position;/* next address in array-space for reshape */ -__le32 delta_disks;/* change in number of raid_disks */ -__le32 new_layout;/* new layout */ -__le32 new_chunk;/* new chunk size (512byte sectors) */ -__le32 new_offset;/* signed number to add to data_offset in new -* layout. 0 == no-change. This can be -* different on each device in the array. -*/ - -/* constant this-device information - 64 bytes */ -__le64 data_offset;/* sector start of data, often 0 */ -__le64 data_size;/* sectors in this device that can be used for data */ -__le64 super_offset;/* sector start of this superblock */ -__le64 recovery_offset;/* sectors before this offset (from data_offset) have been recovered */ -__le32 dev_number;/* permanent identifier of this device - not role in raid */ -__le32 cnt_corrected_read;/* number of read errors that were corrected by re-writing */ -__u8 device_uuid[16 ];/* user-space setable, ignored by kernel */ -__u8 devflags;/* per-device flags. Only one defined...*/ -#define WriteMostly1 1/* mask for writemostly flag in above */ -/* Bad block log. If there are any bad blocks the feature flag is set. -* If offset and size are non-zero, that space is reserved and available -*/ -__u8 bblog_shift;/* shift from sectors to block size */ -__le16 bblog_size;/* number of sectors reserved for list */ -__le32 bblog_offset;/* sector offset from superblock to bblog, -* signed - not unsigned */ - -/* array state information - 64 bytes */ -__le64 utime;/* 40 bits second, 24 bits microseconds */ -__le64 events;/* incremented when superblock updated */ -__le64 resync_offset;/* data before this offset (from data_offset) known to be in sync */ -__le32 sb_csum;/* checksum up to devs[max_dev] */ -__le32 max_dev;/* size of devs[] array to consider */ -__u8 pad3[64 -32 ];/* set to 0 when writing */ - -/* device state information. Indexed by dev_number. -* 2 bytes per device -* Note there are no per-device state flags. State information is rolled -* into the 'roles' value. If a device is spare or faulty, then it doesn't -* have a meaningful role. -*/ -__le16 dev_roles[0 ];/* role in array, or 0xffff for a spare, or 0xfffe for faulty */ -}; - -/* feature_map bits */ -#define MD_FEATURE_BITMAP_OFFSET 1 -#define MD_FEATURE_RECOVERY_OFFSET 2/* recovery_offset is present and -* must be honoured -*/ -#define MD_FEATURE_RESHAPE_ACTIVE 4 -#define MD_FEATURE_BAD_BLOCKS 8/* badblock list is not empty */ -#define MD_FEATURE_REPLACEMENT 16/* This device is replacing an -* active device with same 'role'. -* 'recovery_offset' is also set. -*/ -#define MD_FEATURE_RESHAPE_BACKWARDS 32/* Reshape doesn't change number -* of devices, but is going -* backwards anyway. -*/ -#define MD_FEATURE_NEW_OFFSET 64/* new_offset must be honoured */ -#define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ - |MD_FEATURE_RECOVERY_OFFSET \ - |MD_FEATURE_RESHAPE_ACTIVE \ - |MD_FEATURE_BAD_BLOCKS \ - |MD_FEATURE_REPLACEMENT \ - |MD_FEATURE_RESHAPE_BACKWARDS \ - |MD_FEATURE_NEW_OFFSET \ - ) - -#endif include/uapi/linux/kvm.h +2
-0@@ -921,6 +921,8 @@ struct kvm_s390_ucas_mapping {#define KVM_SET_ONE_REG _IOW(KVMIO, 0xac, struct kvm_one_reg)/* VM is being stopped by host */ #define KVM_KVMCLOCK_CTRL _IO(KVMIO, 0xad) +/* Set the consignment limit which will be used to separete steal time */ +#define KVM_SET_ENTITLEMENT _IOW(KVMIO, 0xae, unsigned long)#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)tools/perf/builtin-test.c deleted +0
-1559@@ -1,1559 +0,0 @@ -/* -* builtin-test.c -* -* Builtin regression testing command: ever growing number of sanity tests -*/ -#include "builtin.h" - -#include "util/cache.h" -#include "util/color.h" -#include "util/debug.h" -#include "util/debugfs.h" -#include "util/evlist.h" -#include "util/parse-options.h" -#include "util/parse-events.h" -#include "util/symbol.h" -#include "util/thread_map.h" -#include "util/pmu.h" -#include "event-parse.h" -#include "../../include/linux/hw_breakpoint.h" - -#include <sys/mman.h> - -static int vmlinux_matches_kallsyms_filter (struct map *map__maybe_unused , -struct symbol *sym) -{ -bool *visited =symbol__priv (sym); - *visited = true; -return 0 ; -} - -static int test__vmlinux_matches_kallsyms (void ) -{ -int err =-1 ; -struct rb_node *nd; -struct symbol *sym; -struct map *kallsyms_map, *vmlinux_map; -struct machine kallsyms, vmlinux; -enum map_type type =MAP__FUNCTION ; -struct ref_reloc_sym ref_reloc_sym = { .name ="_stext" , }; - -/* -* Step 1: -* -* Init the machines that will hold kernel, modules obtained from -* both vmlinux + .ko files and from /proc/kallsyms split by modules. -*/ -machine__init (&kallsyms,"" ,HOST_KERNEL_ID ); -machine__init (&vmlinux,"" ,HOST_KERNEL_ID ); - -/* -* Step 2: -* -* Create the kernel maps for kallsyms and the DSO where we will then -* load /proc/kallsyms. Also create the modules maps from /proc/modules -* and find the .ko files that match them in /lib/modules/`uname -r`/. -*/ -if (machine__create_kernel_maps (&kallsyms) <0 ) { -pr_debug ("machine__create_kernel_maps " ); -return -1 ; - } - -/* -* Step 3: -* -* Load and split /proc/kallsyms into multiple maps, one per module. -*/ -if (machine__load_kallsyms (&kallsyms,"/proc/kallsyms" , type,NULL ) <=0 ) { -pr_debug ("dso__load_kallsyms " ); - goto out; - } - -/* -* Step 4: -* -* kallsyms will be internally on demand sorted by name so that we can -* find the reference relocation * symbol, i.e. the symbol we will use -* to see if the running kernel was relocated by checking if it has the -* same value in the vmlinux file we load. -*/ - kallsyms_map =machine__kernel_map (&kallsyms, type); - - sym =map__find_symbol_by_name (kallsyms_map, ref_reloc_sym.name,NULL ); -if (sym ==NULL ) { -pr_debug ("dso__find_symbol_by_name " ); - goto out; - } - - ref_reloc_sym.addr = sym->start; - -/* -* Step 5: -* -* Now repeat step 2, this time for the vmlinux file we'll auto-locate. -*/ -if (machine__create_kernel_maps (&vmlinux) <0 ) { -pr_debug ("machine__create_kernel_maps " ); - goto out; - } - - vmlinux_map =machine__kernel_map (&vmlinux, type); -map__kmap (vmlinux_map)->ref_reloc_sym = &ref_reloc_sym; - -/* -* Step 6: -* -* Locate a vmlinux file in the vmlinux path that has a buildid that -* matches the one of the running kernel. -* -* While doing that look if we find the ref reloc symbol, if we find it -* we'll have its ref_reloc_symbol.unrelocated_addr and then -* maps__reloc_vmlinux will notice and set proper ->[un]map_ip routines -* to fixup the symbols. -*/ -if (machine__load_vmlinux_path (&vmlinux, type, - vmlinux_matches_kallsyms_filter) <=0 ) { -pr_debug ("machine__load_vmlinux_path " ); - goto out; - } - - err =0 ; -/* -* Step 7: -* -* Now look at the symbols in the vmlinux DSO and check if we find all of them -* in the kallsyms dso. For the ones that are in both, check its names and -* end addresses too. -*/ -for (nd =rb_first (&vmlinux_map->dso->symbols[type]); nd; nd =rb_next (nd)) { -struct symbol *pair, *first_pair; -bool backwards = true; - - sym = rb_entry(nd, struct symbol, rb_node); - -if (sym->start == sym->end) -continue ; - - first_pair =machine__find_kernel_symbol (&kallsyms, type, sym->start,NULL ,NULL ); - pair = first_pair; - -if (pair && pair->start == sym->start) { -next_pair: -if (strcmp (sym->name, pair->name) ==0 ) { -/* -* kallsyms don't have the symbol end, so we -* set that by using the next symbol start - 1, -* in some cases we get this up to a page -* wrong, trace_kmalloc when I was developing -* this code was one such example, 2106 bytes -* off the real size. More than that and we -* _really_ have a problem. -*/ -s64 skew = sym->end - pair->end; -if (llabs (skew) < page_size) -continue ; - -pr_debug ("%#" PRIx64": diff end addr for %s v: %#" PRIx64" k: %#" PRIx64"\n" , - sym->start, sym->name, sym->end, pair->end); - }else { -struct rb_node *nnd; -detour: - nnd = backwards ?rb_prev (&pair->rb_node) : -rb_next (&pair->rb_node); -if (nnd) { - struct symbol *next = rb_entry(nnd, struct symbol, rb_node); - -if (next->start == sym->start) { - pair = next; - goto next_pair; - } - } - -if (backwards) { - backwards = false; - pair = first_pair; - goto detour; - } - -pr_debug ("%#" PRIx64": diff name v: %s k: %s\n" , - sym->start, sym->name, pair->name); - } - }else -pr_debug ("%#" PRIx64": %s not on kallsyms\n" , sym->start, sym->name); - - err =-1 ; - } - -if (!verbose) - goto out; - -pr_info ("Maps only in vmlinux:\n" ); - -for (nd =rb_first (&vmlinux.kmaps.maps[type]); nd; nd =rb_next (nd)) { - struct map *pos = rb_entry(nd, struct map, rb_node), *pair; -/* -* If it is the kernel, kallsyms is always "[kernel.kallsyms]", while -* the kernel will have the path for the vmlinux file being used, -* so use the short name, less descriptive but the same ("[kernel]" in -* both cases. -*/ - pair =map_groups__find_by_name (&kallsyms.kmaps, type, - (pos->dso->kernel ? - pos->dso->short_name : - pos->dso->name)); -if (pair) - pair->priv =1 ; -else -map__fprintf (pos, stderr); - } - -pr_info ("Maps in vmlinux with a different name in kallsyms:\n" ); - -for (nd =rb_first (&vmlinux.kmaps.maps[type]); nd; nd =rb_next (nd)) { - struct map *pos = rb_entry(nd, struct map, rb_node), *pair; - - pair =map_groups__find (&kallsyms.kmaps, type, pos->start); -if (pair ==NULL || pair->priv) -continue ; - -if (pair->start == pos->start) { - pair->priv =1 ; -pr_info (" %" PRIx64"-%" PRIx64" %" PRIx64" %s in kallsyms as" , - pos->start, pos->end, pos->pgoff, pos->dso->name); -if (pos->pgoff != pair->pgoff || pos->end != pair->end) -pr_info (": \n*%" PRIx64"-%" PRIx64" %" PRIx64"" , - pair->start, pair->end, pair->pgoff); -pr_info (" %s\n" , pair->dso->name); - pair->priv =1 ; - } - } - -pr_info ("Maps only in kallsyms:\n" ); - -for (nd =rb_first (&kallsyms.kmaps.maps[type]); - nd; nd =rb_next (nd)) { - struct map *pos = rb_entry(nd, struct map, rb_node); - -if (!pos->priv) -map__fprintf (pos, stderr); - } -out: -return err; -} - -#include "util/cpumap.h" -#include "util/evsel.h" -#include <sys/types.h> - -static int trace_event__id (const char *evname) -{ -char *filename; -int err =-1 , fd; - - if (asprintf(&filename, - "%s/syscalls/%s/id",Lines of this file are not shown. View the raw message.
tools/perf/util/dso-test-data.c deleted +0
-153Lines of this file are not shown. View the raw message.
tools/perf/util/parse-events-test.c deleted +0
-1116Lines of this file are not shown. View the raw message.
tools/testing/selftests/epoll/Makefile deleted +0
-11Lines of this file are not shown. View the raw message.
tools/testing/selftests/epoll/test_epoll.c deleted +0
-344Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
--
Gleb.
Part of the diff is not shown here. View the raw message.