linux_dsm_epyc7002/arch/x86/include/asm
H. Peter Anvin 9b710506a0 x86, bitops: Change bitops to be native operand size
Change the bitops operation to be naturally "long", i.e. 63 bits on
the 64-bit kernel.  Additional bugs are likely to crop up in the
future.

We already have bugs which machines with > 16 TiB of memory in a
single node, as can happen if memory is interleaved.  The x86 bitop
operations take a signed index, so using an unsigned type is not an
option.

Jim Kukunas measured the effect of this patch on kernel size: it adds
2779 bytes to the allyesconfig kernel.  Some of that probably could be
elided by replacing the inline functions with macros which select the
32-bit type if the index is a 32-bit value, something like:

In that case we could also use "Jr" constraints for the 64-bit
version.

However, this would more than double the amount of code for a
relatively small gain.

Note that we can't use ilog2() for _BITOPS_LONG_SHIFT, as that causes
a recursive header inclusion problem.

The change to constant_test_bit() should both generate better code and
give correct result for negative bit indicies.  As previously written
the compiler had to generate extra code to create the proper wrong
result for negative values.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Jim Kukunas <james.t.kukunas@intel.com>
Link: http://lkml.kernel.org/n/tip-z61ofiwe90xeyb461o72h8ya@git.kernel.org
2013-07-16 15:24:04 -07:00
..
crypto crypto: camellia - add AVX2/AES-NI/x86_64 assembler implementation of camellia cipher 2013-04-25 21:09:07 +08:00
numachip
uv x86, uv, uv3: Trim MMR register definitions after code changes for SGI UV3 2013-02-11 17:18:25 -08:00
visws
xen xen-pciback: notify hypervisor about devices intended to be assigned to guests 2013-03-22 10:20:55 -04:00
a.out-core.h
acpi.h ACPICA: Update compilation environment settings. 2013-01-10 12:36:17 +01:00
agp.h
alternative-asm.h
alternative.h
amd_nb.h x86, AMD, NB: Add multi-domain support 2013-01-10 16:17:58 +01:00
apb_timer.h
apic_flat_64.h
apic.h
apicdef.h
apm.h
arch_hweight.h
archrandom.h
asm-offsets.h
asm.h
atomic64_32.h
atomic64_64.h
atomic.h
barrier.h
bios_ebda.h
bitops.h x86, bitops: Change bitops to be native operand size 2013-07-16 15:24:04 -07:00
boot.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
bootparam_utils.h x86, doc: Be explicit about what the x86 struct boot_params requires 2013-03-06 20:34:43 -08:00
bug.h dump_stack: unify debug information printed by show_regs() 2013-04-30 17:04:02 -07:00
bugs.h
cache.h
cacheflush.h
calgary.h
calling.h
ce4100.h
checksum_32.h
checksum_64.h
checksum.h
clocksource.h
cmpxchg_32.h
cmpxchg_64.h
cmpxchg.h x86 cmpxchg.h: fix wrong comment 2013-04-25 10:39:04 +02:00
compat.h
context_tracking.h context_tracking: Move exception handling to generic code 2013-03-07 17:09:25 +01:00
cpu_device_id.h
cpu.h
cpufeature.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-05-02 14:53:12 -07:00
cpumask.h
cputime.h
current.h
debugreg.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
delay.h
desc_defs.h
desc.h
device.h
div64.h
dma-contiguous.h
dma-mapping.h
dma.h
dmi.h
dwarf2.h
e820.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
edac.h
efi.h efi: Pass boot services variable info to runtime code 2013-04-15 21:31:09 +01:00
elf.h
emergency-restart.h
entry_arch.h KVM: VMX: Register a new IPI for posted interrupt 2013-04-16 16:32:39 -03:00
exec.h
fb.h
fixmap.h Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:40:35 -07:00
floppy.h
fpu-internal.h x86: convert to ksignal 2013-02-14 09:21:17 -05:00
frame.h
ftrace.h tracing/syscalls: Allow archs to ignore tracing compat syscalls 2013-02-12 17:46:28 -05:00
futex.h
gart.h
genapic.h
geode.h
gpio.h
hardirq.h KVM: VMX: Register a new IPI for posted interrupt 2013-04-16 16:32:39 -03:00
highmem.h
hpet.h x86, hpet: Introduce x86_msi_ops.setup_hpet_msi 2013-01-28 10:48:30 +01:00
hugetlb.h mm/hugetlb: add more arch-defined huge_pte functions 2013-04-29 15:54:33 -07:00
hw_breakpoint.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
hw_irq.h KVM: VMX: Register a new IPI for posted interrupt 2013-04-16 16:32:39 -03:00
hypertransport.h
hypervisor.h x86: Make Linux guest support optional 2013-03-04 13:14:25 -08:00
i387.h
i8259.h
ia32_unistd.h
ia32.h x86: switch to generic old sigaction 2013-02-03 18:16:27 -05:00
idle.h
inat_types.h
inat.h
init.h x86, 64bit, mm: Add generic kernel/ident mapping helper 2013-01-29 15:12:25 -08:00
insn.h
inst.h
intel_scu_ipc.h
io_apic.h x86, io_apic: Introduce eoi_ioapic_pin call-back 2013-01-28 12:51:52 +01:00
io.h
iomap.h
iommu_table.h
iommu.h
ipi.h
irq_regs.h
irq_remapping.h iommu: Fix compile warnings with forward declarations 2013-04-19 20:34:55 +02:00
irq_vectors.h KVM: VMX: Register a new IPI for posted interrupt 2013-04-16 16:32:39 -03:00
irq.h
irqflags.h
ist.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
jump_label.h
kbdleds.h
Kbuild UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
kdebug.h
kexec.h x86, kexec: Remove 1024G limitation for kexec buffer on 64bit 2013-01-29 15:26:23 -08:00
kgdb.h
kmap_types.h
kmemcheck.h
kprobes.h kprobes/x86: Check Interrupt Flag modifier when registering probe 2013-03-18 10:21:23 +01:00
kvm_emulate.h
kvm_guest.h
kvm_host.h x86: Rename X86_CR4_RDWRGSFS to X86_CR4_FSGSBASE 2013-06-25 16:26:06 -07:00
kvm_para.h Merge tag 'kvm-3.9-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-02-24 13:07:18 -08:00
lguest_hcall.h
lguest.h lguest: map Switcher below fixmap. 2013-04-22 15:45:03 +09:30
linkage.h ix86: Tighten asmlinkage_protect() constraints 2013-01-24 11:25:59 +01:00
local64.h
local.h
mach_timer.h
mach_traps.h
math_emu.h
mc146818rtc.h
mce.h x86/mce: Rework cmci_rediscover() to play well with CPU hotplug 2013-04-02 14:04:01 -07:00
microcode_intel.h x86/microcode_intel.h: Define functions and macros for early loading ucode 2013-01-31 13:18:50 -08:00
microcode.h x86/microcode_core_early.c: Define interfaces for early loading ucode 2013-01-31 13:19:12 -08:00
mmconfig.h
mmu_context.h
mmu.h
mmx.h
mmzone_32.h x86-32, mm: Remove reference to resume_map_numa_kva() 2013-01-31 14:12:30 -08:00
mmzone_64.h
mmzone.h
module.h
mpspec_def.h
mpspec.h
mrst-vrtc.h
mrst.h
mshyperv.h X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts 2013-02-12 16:27:15 -08:00
msidef.h
msr.h x86, msr: Unify variable names 2013-04-02 16:03:32 -07:00
mtrr.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
mutex_32.h
mutex_64.h x86: Use asm-goto to implement mutex fast path on x86-64 2013-06-28 15:22:18 -07:00
mutex.h
mwait.h intel_idle: remove assumption of one C-state per MWAIT flag 2013-02-08 19:29:16 -05:00
nmi.h
nops.h
numa_32.h
numa.h cpu-hotplug,memory-hotplug: clear cpu_to_node() when offlining the node 2013-02-23 17:50:13 -08:00
numaq.h
olpc_ofw.h
olpc.h
page_32_types.h
page_32.h
page_64_types.h x86: Drop KERNEL_IMAGE_START 2013-04-02 16:03:29 -07:00
page_64.h
page_types.h
page.h Merge remote-tracking branch 'origin/x86/mm' into x86/mm2 2013-02-01 02:28:36 -08:00
paravirt_types.h Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:41:21 -07:00
paravirt.h Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:41:21 -07:00
parport.h X86: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
pat.h
pci_64.h
pci_x86.h PCI changes for the v3.9 merge window: 2013-02-25 21:18:18 -08:00
pci-direct.h
pci-functions.h
pci.h PCI changes for the v3.9 merge window: 2013-02-25 21:18:18 -08:00
percpu.h
perf_event_p4.h perf/x86/intel/P4: Robistify P4 PMU types 2013-04-26 09:31:41 +02:00
perf_event.h perf/x86/amd: Enable northbridge performance counters on AMD family 15h 2013-02-16 09:37:27 +01:00
pgalloc.h
pgtable_32_types.h
pgtable_32.h x86/mm: Convert update_mmu_cache() and update_mmu_cache_pmd() to functions 2013-01-24 16:12:13 +01:00
pgtable_64_types.h x86, 64bit: Use a #PF handler to materialize early mappings on demand 2013-01-29 15:20:06 -08:00
pgtable_64.h Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-21 18:06:55 -08:00
pgtable_types.h x86/mm/cpa: Cleanup split_large_page() and its callee 2013-04-10 14:39:08 +02:00
pgtable-2level_types.h
pgtable-2level.h
pgtable-3level_types.h
pgtable-3level.h
pgtable.h Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-21 18:06:55 -08:00
posix_types.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
probe_roms.h
processor-cyrix.h
processor-flags.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
processor.h x86, cpu: Convert AMD Erratum 400 2013-04-02 10:12:55 -07:00
prom.h
proto.h x86-64: don't set the early IDT to point directly to 'early_idt_handler' 2013-02-22 13:09:51 -08:00
ptrace.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
pvclock-abi.h
pvclock.h
realmode.h x86, realmode: Separate real_mode reserve and setup 2013-01-29 15:13:24 -08:00
reboot_fixups.h
reboot.h
required-features.h x86: Require MOVBE feature in cpuid when we use it 2013-01-28 16:59:55 -08:00
resume-trace.h
rio.h
rtc.h
rwlock.h
rwsem.h x86 rwsem: avoid taking slow path when stealing write lock 2013-05-07 07:20:17 -07:00
scatterlist.h
seccomp_32.h
seccomp_64.h
seccomp.h
sections.h
segment.h
serial.h
setup_arch.h
setup.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
shmparam.h
sigcontext.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
sigframe.h
sighandling.h
signal.h x86: switch to generic old sigaction 2013-02-03 18:16:27 -05:00
smap.h
smp.h
smpboot_hooks.h
sparsemem.h
special_insns.h x86: __force_order doesn't need to be an actual variable 2013-05-31 13:09:17 +02:00
spinlock_types.h
spinlock.h
sta2x11.h
stackprotector.h
stacktrace.h
string_32.h
string_64.h
string.h
suspend_32.h x86, gdt, hibernate: Store/load GDT for hibernate path. 2013-05-02 11:27:35 -07:00
suspend_64.h x86, gdt, hibernate: Store/load GDT for hibernate path. 2013-05-02 11:27:35 -07:00
suspend.h
svm.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
swiotlb.h
switch_to.h
sync_bitops.h x86, bitops: Change bitops to be native operand size 2013-07-16 15:24:04 -07:00
sys_ia32.h unify compat fanotify_mark(2), switch to COMPAT_SYSCALL_DEFINE 2013-05-09 13:46:38 -04:00
syscall.h x86: remove the x32 syscall bitmask from syscall_get_nr() 2013-04-02 14:38:09 -07:00
syscalls.h x86, vm86: fix VM86 syscalls: use SYSCALL_DEFINEx(...) 2013-05-02 20:36:32 -04:00
tce.h
thread_info.h arch: Consolidate tsk_is_polling() 2013-04-08 17:39:22 +02:00
time.h
timer.h
timex.h
tlb.h x86-32: Fix possible incomplete TLB invalidate with PAE pagetables 2013-04-12 16:56:47 -07:00
tlbflush.h x86/tlbflush.h: Define __native_flush_tlb_global_irq_disabled() 2013-01-31 13:19:16 -08:00
topology.h
trace_clock.h
traps.h
tsc.h
uaccess_32.h
uaccess_64.h
uaccess.h x86, doc: Clarify the use of asm("%edx") in uaccess.h 2013-02-12 15:37:02 -08:00
unaligned.h
unistd.h consolidate cond_syscall and SYSCALL_ALIAS declarations 2013-03-03 22:55:19 -05:00
uprobes.h uretprobes/x86: Hijack return address 2013-04-13 15:31:55 +02:00
user32.h
user_32.h
user_64.h
user.h
vdso.h
vga.h
vgtod.h
virtext.h
vm86.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
vmx.h KVM: nVMX: Shadow-vmcs control fields/bits 2013-04-22 10:51:09 +03:00
vsyscall.h UAPI: (Scripted) Disintegrate arch/x86/include/asm 2012-12-14 22:37:13 +00:00
vvar.h
word-at-a-time.h
x2apic.h
x86_init.h Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-21 18:06:55 -08:00
xcr.h
xor_32.h x86/xor: Add alternative SSE implementation only prefetching once per 64-byte line 2013-01-25 09:23:50 +01:00
xor_64.h x86/xor: Add alternative SSE implementation only prefetching once per 64-byte line 2013-01-25 09:23:50 +01:00
xor_avx.h
xor.h x86/xor: Add alternative SSE implementation only prefetching once per 64-byte line 2013-01-25 09:23:50 +01:00
xsave.h