Commit de0bc3df authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile

Pull more tile architecture updates from Chris Metcalf:
 "This second batch of changes is just cleanup of various kinds from
  doing some tidying work in the sources.

  Some dead code is removed, comment typos fixed, whitespace and style
  issues cleaned up, and some header updates from our internal
  "upstream" architecture team"

* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: remove stray blank space
  tile: <arch/> header updates from upstream
  tile: improve gxio iorpc autogenerated code style
  tile: double default VMALLOC space
  tile: remove stale arch/tile/kernel/futex_64.S
  tile: remove HUGE_VMAP dead code
  tile: use pmd_pfn() instead of casting via pte_t
  tile: fix typos in comment in arch/tile/kernel/unaligned.c
parents 272b98c6 e823acc0
...@@ -361,7 +361,7 @@ config CMDLINE_OVERRIDE ...@@ -361,7 +361,7 @@ config CMDLINE_OVERRIDE
config VMALLOC_RESERVE config VMALLOC_RESERVE
hex hex
default 0x1000000 default 0x2000000
config HARDWALL config HARDWALL
bool "Hardwall support to allow access to user dynamic network" bool "Hardwall support to allow access to user dynamic network"
......
...@@ -21,7 +21,7 @@ struct alloc_buffer_stacks_param { ...@@ -21,7 +21,7 @@ struct alloc_buffer_stacks_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_mpipe_alloc_buffer_stacks(gxio_mpipe_context_t * context, int gxio_mpipe_alloc_buffer_stacks(gxio_mpipe_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags) unsigned int flags)
{ {
...@@ -45,7 +45,7 @@ struct init_buffer_stack_aux_param { ...@@ -45,7 +45,7 @@ struct init_buffer_stack_aux_param {
unsigned int buffer_size_enum; unsigned int buffer_size_enum;
}; };
int gxio_mpipe_init_buffer_stack_aux(gxio_mpipe_context_t * context, int gxio_mpipe_init_buffer_stack_aux(gxio_mpipe_context_t *context,
void *mem_va, size_t mem_size, void *mem_va, size_t mem_size,
unsigned int mem_flags, unsigned int stack, unsigned int mem_flags, unsigned int stack,
unsigned int buffer_size_enum) unsigned int buffer_size_enum)
...@@ -80,7 +80,7 @@ struct alloc_notif_rings_param { ...@@ -80,7 +80,7 @@ struct alloc_notif_rings_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_mpipe_alloc_notif_rings(gxio_mpipe_context_t * context, int gxio_mpipe_alloc_notif_rings(gxio_mpipe_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags) unsigned int flags)
{ {
...@@ -102,7 +102,7 @@ struct init_notif_ring_aux_param { ...@@ -102,7 +102,7 @@ struct init_notif_ring_aux_param {
unsigned int ring; unsigned int ring;
}; };
int gxio_mpipe_init_notif_ring_aux(gxio_mpipe_context_t * context, void *mem_va, int gxio_mpipe_init_notif_ring_aux(gxio_mpipe_context_t *context, void *mem_va,
size_t mem_size, unsigned int mem_flags, size_t mem_size, unsigned int mem_flags,
unsigned int ring) unsigned int ring)
{ {
...@@ -133,7 +133,7 @@ struct request_notif_ring_interrupt_param { ...@@ -133,7 +133,7 @@ struct request_notif_ring_interrupt_param {
unsigned int ring; unsigned int ring;
}; };
int gxio_mpipe_request_notif_ring_interrupt(gxio_mpipe_context_t * context, int gxio_mpipe_request_notif_ring_interrupt(gxio_mpipe_context_t *context,
int inter_x, int inter_y, int inter_x, int inter_y,
int inter_ipi, int inter_event, int inter_ipi, int inter_event,
unsigned int ring) unsigned int ring)
...@@ -158,7 +158,7 @@ struct enable_notif_ring_interrupt_param { ...@@ -158,7 +158,7 @@ struct enable_notif_ring_interrupt_param {
unsigned int ring; unsigned int ring;
}; };
int gxio_mpipe_enable_notif_ring_interrupt(gxio_mpipe_context_t * context, int gxio_mpipe_enable_notif_ring_interrupt(gxio_mpipe_context_t *context,
unsigned int ring) unsigned int ring)
{ {
struct enable_notif_ring_interrupt_param temp; struct enable_notif_ring_interrupt_param temp;
...@@ -179,7 +179,7 @@ struct alloc_notif_groups_param { ...@@ -179,7 +179,7 @@ struct alloc_notif_groups_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_mpipe_alloc_notif_groups(gxio_mpipe_context_t * context, int gxio_mpipe_alloc_notif_groups(gxio_mpipe_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags) unsigned int flags)
{ {
...@@ -201,7 +201,7 @@ struct init_notif_group_param { ...@@ -201,7 +201,7 @@ struct init_notif_group_param {
gxio_mpipe_notif_group_bits_t bits; gxio_mpipe_notif_group_bits_t bits;
}; };
int gxio_mpipe_init_notif_group(gxio_mpipe_context_t * context, int gxio_mpipe_init_notif_group(gxio_mpipe_context_t *context,
unsigned int group, unsigned int group,
gxio_mpipe_notif_group_bits_t bits) gxio_mpipe_notif_group_bits_t bits)
{ {
...@@ -223,7 +223,7 @@ struct alloc_buckets_param { ...@@ -223,7 +223,7 @@ struct alloc_buckets_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_mpipe_alloc_buckets(gxio_mpipe_context_t * context, unsigned int count, int gxio_mpipe_alloc_buckets(gxio_mpipe_context_t *context, unsigned int count,
unsigned int first, unsigned int flags) unsigned int first, unsigned int flags)
{ {
struct alloc_buckets_param temp; struct alloc_buckets_param temp;
...@@ -244,7 +244,7 @@ struct init_bucket_param { ...@@ -244,7 +244,7 @@ struct init_bucket_param {
MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info; MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info;
}; };
int gxio_mpipe_init_bucket(gxio_mpipe_context_t * context, unsigned int bucket, int gxio_mpipe_init_bucket(gxio_mpipe_context_t *context, unsigned int bucket,
MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info) MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info)
{ {
struct init_bucket_param temp; struct init_bucket_param temp;
...@@ -265,7 +265,7 @@ struct alloc_edma_rings_param { ...@@ -265,7 +265,7 @@ struct alloc_edma_rings_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_mpipe_alloc_edma_rings(gxio_mpipe_context_t * context, int gxio_mpipe_alloc_edma_rings(gxio_mpipe_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags) unsigned int flags)
{ {
...@@ -288,7 +288,7 @@ struct init_edma_ring_aux_param { ...@@ -288,7 +288,7 @@ struct init_edma_ring_aux_param {
unsigned int channel; unsigned int channel;
}; };
int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t * context, void *mem_va, int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t *context, void *mem_va,
size_t mem_size, unsigned int mem_flags, size_t mem_size, unsigned int mem_flags,
unsigned int ring, unsigned int channel) unsigned int ring, unsigned int channel)
{ {
...@@ -315,7 +315,7 @@ int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t * context, void *mem_va, ...@@ -315,7 +315,7 @@ int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t * context, void *mem_va,
EXPORT_SYMBOL(gxio_mpipe_init_edma_ring_aux); EXPORT_SYMBOL(gxio_mpipe_init_edma_ring_aux);
int gxio_mpipe_commit_rules(gxio_mpipe_context_t * context, const void *blob, int gxio_mpipe_commit_rules(gxio_mpipe_context_t *context, const void *blob,
size_t blob_size) size_t blob_size)
{ {
const void *params = blob; const void *params = blob;
...@@ -332,7 +332,7 @@ struct register_client_memory_param { ...@@ -332,7 +332,7 @@ struct register_client_memory_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_mpipe_register_client_memory(gxio_mpipe_context_t * context, int gxio_mpipe_register_client_memory(gxio_mpipe_context_t *context,
unsigned int iotlb, HV_PTE pte, unsigned int iotlb, HV_PTE pte,
unsigned int flags) unsigned int flags)
{ {
...@@ -355,7 +355,7 @@ struct link_open_aux_param { ...@@ -355,7 +355,7 @@ struct link_open_aux_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_mpipe_link_open_aux(gxio_mpipe_context_t * context, int gxio_mpipe_link_open_aux(gxio_mpipe_context_t *context,
_gxio_mpipe_link_name_t name, unsigned int flags) _gxio_mpipe_link_name_t name, unsigned int flags)
{ {
struct link_open_aux_param temp; struct link_open_aux_param temp;
...@@ -374,7 +374,7 @@ struct link_close_aux_param { ...@@ -374,7 +374,7 @@ struct link_close_aux_param {
int mac; int mac;
}; };
int gxio_mpipe_link_close_aux(gxio_mpipe_context_t * context, int mac) int gxio_mpipe_link_close_aux(gxio_mpipe_context_t *context, int mac)
{ {
struct link_close_aux_param temp; struct link_close_aux_param temp;
struct link_close_aux_param *params = &temp; struct link_close_aux_param *params = &temp;
...@@ -393,7 +393,7 @@ struct link_set_attr_aux_param { ...@@ -393,7 +393,7 @@ struct link_set_attr_aux_param {
int64_t val; int64_t val;
}; };
int gxio_mpipe_link_set_attr_aux(gxio_mpipe_context_t * context, int mac, int gxio_mpipe_link_set_attr_aux(gxio_mpipe_context_t *context, int mac,
uint32_t attr, int64_t val) uint32_t attr, int64_t val)
{ {
struct link_set_attr_aux_param temp; struct link_set_attr_aux_param temp;
...@@ -415,8 +415,8 @@ struct get_timestamp_aux_param { ...@@ -415,8 +415,8 @@ struct get_timestamp_aux_param {
uint64_t cycles; uint64_t cycles;
}; };
int gxio_mpipe_get_timestamp_aux(gxio_mpipe_context_t * context, uint64_t * sec, int gxio_mpipe_get_timestamp_aux(gxio_mpipe_context_t *context, uint64_t *sec,
uint64_t * nsec, uint64_t * cycles) uint64_t *nsec, uint64_t *cycles)
{ {
int __result; int __result;
struct get_timestamp_aux_param temp; struct get_timestamp_aux_param temp;
...@@ -440,7 +440,7 @@ struct set_timestamp_aux_param { ...@@ -440,7 +440,7 @@ struct set_timestamp_aux_param {
uint64_t cycles; uint64_t cycles;
}; };
int gxio_mpipe_set_timestamp_aux(gxio_mpipe_context_t * context, uint64_t sec, int gxio_mpipe_set_timestamp_aux(gxio_mpipe_context_t *context, uint64_t sec,
uint64_t nsec, uint64_t cycles) uint64_t nsec, uint64_t cycles)
{ {
struct set_timestamp_aux_param temp; struct set_timestamp_aux_param temp;
...@@ -460,8 +460,7 @@ struct adjust_timestamp_aux_param { ...@@ -460,8 +460,7 @@ struct adjust_timestamp_aux_param {
int64_t nsec; int64_t nsec;
}; };
int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t * context, int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t *context, int64_t nsec)
int64_t nsec)
{ {
struct adjust_timestamp_aux_param temp; struct adjust_timestamp_aux_param temp;
struct adjust_timestamp_aux_param *params = &temp; struct adjust_timestamp_aux_param *params = &temp;
...@@ -475,25 +474,6 @@ int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t * context, ...@@ -475,25 +474,6 @@ int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t * context,
EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_aux); EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_aux);
struct adjust_timestamp_freq_param {
int32_t ppb;
};
int gxio_mpipe_adjust_timestamp_freq(gxio_mpipe_context_t * context,
int32_t ppb)
{
struct adjust_timestamp_freq_param temp;
struct adjust_timestamp_freq_param *params = &temp;
params->ppb = ppb;
return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
sizeof(*params),
GXIO_MPIPE_OP_ADJUST_TIMESTAMP_FREQ);
}
EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_freq);
struct config_edma_ring_blks_param { struct config_edma_ring_blks_param {
unsigned int ering; unsigned int ering;
unsigned int max_blks; unsigned int max_blks;
...@@ -501,7 +481,7 @@ struct config_edma_ring_blks_param { ...@@ -501,7 +481,7 @@ struct config_edma_ring_blks_param {
unsigned int db; unsigned int db;
}; };
int gxio_mpipe_config_edma_ring_blks(gxio_mpipe_context_t * context, int gxio_mpipe_config_edma_ring_blks(gxio_mpipe_context_t *context,
unsigned int ering, unsigned int max_blks, unsigned int ering, unsigned int max_blks,
unsigned int min_snf_blks, unsigned int db) unsigned int min_snf_blks, unsigned int db)
{ {
...@@ -520,11 +500,29 @@ int gxio_mpipe_config_edma_ring_blks(gxio_mpipe_context_t * context, ...@@ -520,11 +500,29 @@ int gxio_mpipe_config_edma_ring_blks(gxio_mpipe_context_t * context,
EXPORT_SYMBOL(gxio_mpipe_config_edma_ring_blks); EXPORT_SYMBOL(gxio_mpipe_config_edma_ring_blks);
struct adjust_timestamp_freq_param {
int32_t ppb;
};
int gxio_mpipe_adjust_timestamp_freq(gxio_mpipe_context_t *context, int32_t ppb)
{
struct adjust_timestamp_freq_param temp;
struct adjust_timestamp_freq_param *params = &temp;
params->ppb = ppb;
return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
sizeof(*params),
GXIO_MPIPE_OP_ADJUST_TIMESTAMP_FREQ);
}
EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_freq);
struct arm_pollfd_param { struct arm_pollfd_param {
union iorpc_pollfd pollfd; union iorpc_pollfd pollfd;
}; };
int gxio_mpipe_arm_pollfd(gxio_mpipe_context_t * context, int pollfd_cookie) int gxio_mpipe_arm_pollfd(gxio_mpipe_context_t *context, int pollfd_cookie)
{ {
struct arm_pollfd_param temp; struct arm_pollfd_param temp;
struct arm_pollfd_param *params = &temp; struct arm_pollfd_param *params = &temp;
...@@ -541,7 +539,7 @@ struct close_pollfd_param { ...@@ -541,7 +539,7 @@ struct close_pollfd_param {
union iorpc_pollfd pollfd; union iorpc_pollfd pollfd;
}; };
int gxio_mpipe_close_pollfd(gxio_mpipe_context_t * context, int pollfd_cookie) int gxio_mpipe_close_pollfd(gxio_mpipe_context_t *context, int pollfd_cookie)
{ {
struct close_pollfd_param temp; struct close_pollfd_param temp;
struct close_pollfd_param *params = &temp; struct close_pollfd_param *params = &temp;
...@@ -558,7 +556,7 @@ struct get_mmio_base_param { ...@@ -558,7 +556,7 @@ struct get_mmio_base_param {
HV_PTE base; HV_PTE base;
}; };
int gxio_mpipe_get_mmio_base(gxio_mpipe_context_t * context, HV_PTE *base) int gxio_mpipe_get_mmio_base(gxio_mpipe_context_t *context, HV_PTE *base)
{ {
int __result; int __result;
struct get_mmio_base_param temp; struct get_mmio_base_param temp;
...@@ -579,7 +577,7 @@ struct check_mmio_offset_param { ...@@ -579,7 +577,7 @@ struct check_mmio_offset_param {
unsigned long size; unsigned long size;
}; };
int gxio_mpipe_check_mmio_offset(gxio_mpipe_context_t * context, int gxio_mpipe_check_mmio_offset(gxio_mpipe_context_t *context,
unsigned long offset, unsigned long size) unsigned long offset, unsigned long size)
{ {
struct check_mmio_offset_param temp; struct check_mmio_offset_param temp;
......
...@@ -15,12 +15,11 @@ ...@@ -15,12 +15,11 @@
/* This file is machine-generated; DO NOT EDIT! */ /* This file is machine-generated; DO NOT EDIT! */
#include "gxio/iorpc_mpipe_info.h" #include "gxio/iorpc_mpipe_info.h"
struct instance_aux_param { struct instance_aux_param {
_gxio_mpipe_link_name_t name; _gxio_mpipe_link_name_t name;
}; };
int gxio_mpipe_info_instance_aux(gxio_mpipe_info_context_t * context, int gxio_mpipe_info_instance_aux(gxio_mpipe_info_context_t *context,
_gxio_mpipe_link_name_t name) _gxio_mpipe_link_name_t name)
{ {
struct instance_aux_param temp; struct instance_aux_param temp;
...@@ -39,10 +38,10 @@ struct enumerate_aux_param { ...@@ -39,10 +38,10 @@ struct enumerate_aux_param {
_gxio_mpipe_link_mac_t mac; _gxio_mpipe_link_mac_t mac;
}; };
int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t * context, int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t *context,
unsigned int idx, unsigned int idx,
_gxio_mpipe_link_name_t * name, _gxio_mpipe_link_name_t *name,
_gxio_mpipe_link_mac_t * mac) _gxio_mpipe_link_mac_t *mac)
{ {
int __result; int __result;
struct enumerate_aux_param temp; struct enumerate_aux_param temp;
...@@ -50,7 +49,7 @@ int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t * context, ...@@ -50,7 +49,7 @@ int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t * context,
__result = __result =
hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
(((uint64_t) idx << 32) | (((uint64_t)idx << 32) |
GXIO_MPIPE_INFO_OP_ENUMERATE_AUX)); GXIO_MPIPE_INFO_OP_ENUMERATE_AUX));
*name = params->name; *name = params->name;
*mac = params->mac; *mac = params->mac;
...@@ -64,7 +63,7 @@ struct get_mmio_base_param { ...@@ -64,7 +63,7 @@ struct get_mmio_base_param {
HV_PTE base; HV_PTE base;
}; };
int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t * context, int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t *context,
HV_PTE *base) HV_PTE *base)
{ {
int __result; int __result;
...@@ -86,7 +85,7 @@ struct check_mmio_offset_param { ...@@ -86,7 +85,7 @@ struct check_mmio_offset_param {
unsigned long size; unsigned long size;
}; };
int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t * context, int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t *context,
unsigned long offset, unsigned long size) unsigned long offset, unsigned long size)
{ {
struct check_mmio_offset_param temp; struct check_mmio_offset_param temp;
......
...@@ -21,7 +21,7 @@ struct alloc_asids_param { ...@@ -21,7 +21,7 @@ struct alloc_asids_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_trio_alloc_asids(gxio_trio_context_t * context, unsigned int count, int gxio_trio_alloc_asids(gxio_trio_context_t *context, unsigned int count,
unsigned int first, unsigned int flags) unsigned int first, unsigned int flags)
{ {
struct alloc_asids_param temp; struct alloc_asids_param temp;
...@@ -44,7 +44,7 @@ struct alloc_memory_maps_param { ...@@ -44,7 +44,7 @@ struct alloc_memory_maps_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_trio_alloc_memory_maps(gxio_trio_context_t * context, int gxio_trio_alloc_memory_maps(gxio_trio_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags) unsigned int flags)
{ {
...@@ -67,7 +67,7 @@ struct alloc_scatter_queues_param { ...@@ -67,7 +67,7 @@ struct alloc_scatter_queues_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_trio_alloc_scatter_queues(gxio_trio_context_t * context, int gxio_trio_alloc_scatter_queues(gxio_trio_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags) unsigned int flags)
{ {
...@@ -91,7 +91,7 @@ struct alloc_pio_regions_param { ...@@ -91,7 +91,7 @@ struct alloc_pio_regions_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_trio_alloc_pio_regions(gxio_trio_context_t * context, int gxio_trio_alloc_pio_regions(gxio_trio_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags) unsigned int flags)
{ {
...@@ -115,7 +115,7 @@ struct init_pio_region_aux_param { ...@@ -115,7 +115,7 @@ struct init_pio_region_aux_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_trio_init_pio_region_aux(gxio_trio_context_t * context, int gxio_trio_init_pio_region_aux(gxio_trio_context_t *context,
unsigned int pio_region, unsigned int mac, unsigned int pio_region, unsigned int mac,
uint32_t bus_address_hi, unsigned int flags) uint32_t bus_address_hi, unsigned int flags)
{ {
...@@ -145,7 +145,7 @@ struct init_memory_map_mmu_aux_param { ...@@ -145,7 +145,7 @@ struct init_memory_map_mmu_aux_param {
unsigned int order_mode; unsigned int order_mode;
}; };
int gxio_trio_init_memory_map_mmu_aux(gxio_trio_context_t * context, int gxio_trio_init_memory_map_mmu_aux(gxio_trio_context_t *context,
unsigned int map, unsigned long va, unsigned int map, unsigned long va,
uint64_t size, unsigned int asid, uint64_t size, unsigned int asid,
unsigned int mac, uint64_t bus_address, unsigned int mac, uint64_t bus_address,
...@@ -175,7 +175,7 @@ struct get_port_property_param { ...@@ -175,7 +175,7 @@ struct get_port_property_param {
struct pcie_trio_ports_property trio_ports; struct pcie_trio_ports_property trio_ports;
}; };
int gxio_trio_get_port_property(gxio_trio_context_t * context, int gxio_trio_get_port_property(gxio_trio_context_t *context,
struct pcie_trio_ports_property *trio_ports) struct pcie_trio_ports_property *trio_ports)
{ {
int __result; int __result;
...@@ -198,7 +198,7 @@ struct config_legacy_intr_param { ...@@ -198,7 +198,7 @@ struct config_legacy_intr_param {
unsigned int intx; unsigned int intx;
}; };
int gxio_trio_config_legacy_intr(gxio_trio_context_t * context, int inter_x, int gxio_trio_config_legacy_intr(gxio_trio_context_t *context, int inter_x,
int inter_y, int inter_ipi, int inter_event, int inter_y, int inter_ipi, int inter_event,
unsigned int mac, unsigned int intx) unsigned int mac, unsigned int intx)
{ {
...@@ -227,7 +227,7 @@ struct config_msi_intr_param { ...@@ -227,7 +227,7 @@ struct config_msi_intr_param {
unsigned int asid; unsigned int asid;
}; };
int gxio_trio_config_msi_intr(gxio_trio_context_t * context, int inter_x, int gxio_trio_config_msi_intr(gxio_trio_context_t *context, int inter_x,
int inter_y, int inter_ipi, int inter_event, int inter_y, int inter_ipi, int inter_event,
unsigned int mac, unsigned int mem_map, unsigned int mac, unsigned int mem_map,
uint64_t mem_map_base, uint64_t mem_map_limit, uint64_t mem_map_base, uint64_t mem_map_limit,
...@@ -259,7 +259,7 @@ struct set_mps_mrs_param { ...@@ -259,7 +259,7 @@ struct set_mps_mrs_param {
unsigned int mac; unsigned int mac;
}; };
int gxio_trio_set_mps_mrs(gxio_trio_context_t * context, uint16_t mps, int gxio_trio_set_mps_mrs(gxio_trio_context_t *context, uint16_t mps,
uint16_t mrs, unsigned int mac) uint16_t mrs, unsigned int mac)
{ {
struct set_mps_mrs_param temp; struct set_mps_mrs_param temp;
...@@ -279,7 +279,7 @@ struct force_rc_link_up_param { ...@@ -279,7 +279,7 @@ struct force_rc_link_up_param {
unsigned int mac; unsigned int mac;
}; };
int gxio_trio_force_rc_link_up(gxio_trio_context_t * context, unsigned int mac) int gxio_trio_force_rc_link_up(gxio_trio_context_t *context, unsigned int mac)
{ {
struct force_rc_link_up_param temp; struct force_rc_link_up_param temp;
struct force_rc_link_up_param *params = &temp; struct force_rc_link_up_param *params = &temp;
...@@ -296,7 +296,7 @@ struct force_ep_link_up_param { ...@@ -296,7 +296,7 @@ struct force_ep_link_up_param {
unsigned int mac; unsigned int mac;
}; };
int gxio_trio_force_ep_link_up(gxio_trio_context_t * context, unsigned int mac) int gxio_trio_force_ep_link_up(gxio_trio_context_t *context, unsigned int mac)
{ {
struct force_ep_link_up_param temp; struct force_ep_link_up_param temp;
struct force_ep_link_up_param *params = &temp; struct force_ep_link_up_param *params = &temp;
...@@ -313,7 +313,7 @@ struct get_mmio_base_param { ...@@ -313,7 +313,7 @@ struct get_mmio_base_param {
HV_PTE base; HV_PTE base;
}; };
int gxio_trio_get_mmio_base(gxio_trio_context_t * context, HV_PTE *base) int gxio_trio_get_mmio_base(gxio_trio_context_t *context, HV_PTE *base)
{ {
int __result; int __result;
struct get_mmio_base_param temp; struct get_mmio_base_param temp;
...@@ -334,7 +334,7 @@ struct check_mmio_offset_param { ...@@ -334,7 +334,7 @@ struct check_mmio_offset_param {
unsigned long size; unsigned long size;
}; };
int gxio_trio_check_mmio_offset(gxio_trio_context_t * context, int gxio_trio_check_mmio_offset(gxio_trio_context_t *context,
unsigned long offset, unsigned long size) unsigned long offset, unsigned long size)
{ {
struct check_mmio_offset_param temp; struct check_mmio_offset_param temp;
......
...@@ -19,7 +19,7 @@ struct cfg_interrupt_param { ...@@ -19,7 +19,7 @@ struct cfg_interrupt_param {
union iorpc_interrupt interrupt; union iorpc_interrupt interrupt;
}; };
int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t * context, int inter_x, int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t *context, int inter_x,
int inter_y, int inter_ipi, int inter_event) int inter_y, int inter_ipi, int inter_event)
{ {
struct cfg_interrupt_param temp; struct cfg_interrupt_param temp;
...@@ -41,7 +41,7 @@ struct register_client_memory_param { ...@@ -41,7 +41,7 @@ struct register_client_memory_param {
unsigned int flags; unsigned int flags;
}; };
int gxio_usb_host_register_client_memory(gxio_usb_host_context_t * context, int gxio_usb_host_register_client_memory(gxio_usb_host_context_t *context,
HV_PTE pte, unsigned int flags) HV_PTE pte, unsigned int flags)
{ {
struct register_client_memory_param temp; struct register_client_memory_param temp;
...@@ -61,7 +61,7 @@ struct get_mmio_base_param { ...@@ -61,7 +61,7 @@ struct get_mmio_base_param {
HV_PTE base; HV_PTE base;
}; };
int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t * context, HV_PTE *base) int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t *context, HV_PTE *base)
{ {
int __result; int __result;
struct get_mmio_base_param temp; struct get_mmio_base_param temp;
...@@ -82,7 +82,7 @@ struct check_mmio_offset_param { ...@@ -82,7 +82,7 @@ struct check_mmio_offset_param {
unsigned long size; unsigned long size;
}; };
int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t * context, int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t *context,
unsigned long offset, unsigned long size) unsigned long offset, unsigned long size)
{ {
struct check_mmio_offset_param temp; struct check_mmio_offset_param temp;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <gxio/kiorpc.h> #include <gxio/kiorpc.h>
#include <gxio/usb_host.h> #include <gxio/usb_host.h>
int gxio_usb_host_init(gxio_usb_host_context_t * context, int usb_index, int gxio_usb_host_init(gxio_usb_host_context_t *context, int usb_index,
int is_ehci) int is_ehci)
{ {
char file[32]; char file[32];
...@@ -63,7 +63,7 @@ int gxio_usb_host_init(gxio_usb_host_context_t * context, int usb_index, ...@@ -63,7 +63,7 @@ int gxio_usb_host_init(gxio_usb_host_context_t * context, int usb_index,
EXPORT_SYMBOL_GPL(gxio_usb_host_init); EXPORT_SYMBOL_GPL(gxio_usb_host_init);
int gxio_usb_host_destroy(gxio_usb_host_context_t * context) int gxio_usb_host_destroy(gxio_usb_host_context_t *context)
{ {
iounmap((void __force __iomem *)(context->mmio_base)); iounmap((void __force __iomem *)(context->mmio_base));
hv_dev_close(context->fd); hv_dev_close(context->fd);
...@@ -76,14 +76,14 @@ int gxio_usb_host_destroy(gxio_usb_host_context_t * context) ...@@ -76,14 +76,14 @@ int gxio_usb_host_destroy(gxio_usb_host_context_t * context)
EXPORT_SYMBOL_GPL(gxio_usb_host_destroy); EXPORT_SYMBOL_GPL(gxio_usb_host_destroy);
void *gxio_usb_host_get_reg_start(gxio_usb_host_context_t * context) void *gxio_usb_host_get_reg_start(gxio_usb_host_context_t *context)
{ {
return context->mmio_base; return context->mmio_base;
} }
EXPORT_SYMBOL_GPL(gxio_usb_host_get_reg_start); EXPORT_SYMBOL_GPL(gxio_usb_host_get_reg_start);
size_t gxio_usb_host_get_reg_len(gxio_usb_host_context_t * context) size_t gxio_usb_host_get_reg_len(gxio_usb_host_context_t *context)
{ {
return HV_USB_HOST_MMIO_SIZE; return HV_USB_HOST_MMIO_SIZE;
} }
......
...@@ -176,7 +176,18 @@ typedef union ...@@ -176,7 +176,18 @@ typedef union
*/ */
uint_reg_t stack_idx : 5; uint_reg_t stack_idx : 5;
/* Reserved. */ /* Reserved. */
uint_reg_t __reserved_2 : 5; uint_reg_t __reserved_2 : 3;
/*
* Instance ID. For devices that support automatic buffer return between
* mPIPE instances, this field indicates the buffer owner. If the INST
* field does not match the mPIPE's instance number when a packet is
* egressed, buffers with HWB set will be returned to the other mPIPE
* instance. Note that not all devices support multi-mPIPE buffer
* return. The MPIPE_EDMA_INFO.REMOTE_BUFF_RTN_SUPPORT bit indicates
* whether the INST field in the buffer descriptor is populated by iDMA
* hardware. This field is ignored on writes.
*/
uint_reg_t inst : 2;
/* /*
* Reads as one to indicate that this is a hardware managed buffer. * Reads as one to indicate that this is a hardware managed buffer.
* Ignored on writes since all buffers on a given stack are the same size. * Ignored on writes since all buffers on a given stack are the same size.
...@@ -205,7 +216,8 @@ typedef union ...@@ -205,7 +216,8 @@ typedef union
uint_reg_t c : 2; uint_reg_t c : 2;
uint_reg_t size : 3; uint_reg_t size : 3;
uint_reg_t hwb : 1; uint_reg_t hwb : 1;
uint_reg_t __reserved_2 : 5; uint_reg_t inst : 2;
uint_reg_t __reserved_2 : 3;
uint_reg_t stack_idx : 5; uint_reg_t stack_idx : 5;
uint_reg_t __reserved_1 : 6; uint_reg_t __reserved_1 : 6;
int_reg_t va : 35; int_reg_t va : 35;
...@@ -231,9 +243,9 @@ typedef union ...@@ -231,9 +243,9 @@ typedef union
/* Reserved. */ /* Reserved. */
uint_reg_t __reserved_0 : 3; uint_reg_t __reserved_0 : 3;
/* eDMA ring being accessed */ /* eDMA ring being accessed */
uint_reg_t ring : 5; uint_reg_t ring : 6;
/* Reserved. */ /* Reserved. */
uint_reg_t __reserved_1 : 18; uint_reg_t __reserved_1 : 17;
/* /*
* This field of the address selects the region (address space) to be * This field of the address selects the region (address space) to be
* accessed. For the egress DMA post region, this field must be 5. * accessed. For the egress DMA post region, this field must be 5.
...@@ -250,8 +262,8 @@ typedef union ...@@ -250,8 +262,8 @@ typedef union
uint_reg_t svc_dom : 5; uint_reg_t svc_dom : 5;
uint_reg_t __reserved_2 : 6; uint_reg_t __reserved_2 : 6;
uint_reg_t region : 3; uint_reg_t region : 3;
uint_reg_t __reserved_1 : 18; uint_reg_t __reserved_1 : 17;
uint_reg_t ring : 5; uint_reg_t ring : 6;
uint_reg_t __reserved_0 : 3; uint_reg_t __reserved_0 : 3;
#endif #endif
}; };
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
#ifndef __ARCH_MPIPE_CONSTANTS_H__ #ifndef __ARCH_MPIPE_CONSTANTS_H__
#define __ARCH_MPIPE_CONSTANTS_H__ #define __ARCH_MPIPE_CONSTANTS_H__
#define MPIPE_NUM_CLASSIFIERS 10 #define MPIPE_NUM_CLASSIFIERS 16
#define MPIPE_CLS_MHZ 1200 #define MPIPE_CLS_MHZ 1200
#define MPIPE_NUM_EDMA_RINGS 32 #define MPIPE_NUM_EDMA_RINGS 64
#define MPIPE_NUM_SGMII_MACS 16 #define MPIPE_NUM_SGMII_MACS 16
#define MPIPE_NUM_XAUI_MACS 4 #define MPIPE_NUM_XAUI_MACS 16
#define MPIPE_NUM_LOOPBACK_CHANNELS 4 #define MPIPE_NUM_LOOPBACK_CHANNELS 4
#define MPIPE_NUM_NON_LB_CHANNELS 28 #define MPIPE_NUM_NON_LB_CHANNELS 28
......
...@@ -44,8 +44,14 @@ typedef union ...@@ -44,8 +44,14 @@ typedef union
* descriptors toggles each time the ring tail pointer wraps. * descriptors toggles each time the ring tail pointer wraps.
*/ */
uint_reg_t gen : 1; uint_reg_t gen : 1;
/**
* For devices with EDMA reorder support, this field allows the
* descriptor to select the egress FIFO. The associated DMA ring must
* have ALLOW_EFIFO_SEL enabled.
*/
uint_reg_t efifo_sel : 6;
/** Reserved. Must be zero. */ /** Reserved. Must be zero. */
uint_reg_t r0 : 7; uint_reg_t r0 : 1;
/** Checksum generation enabled for this transfer. */ /** Checksum generation enabled for this transfer. */
uint_reg_t csum : 1; uint_reg_t csum : 1;
/** /**
...@@ -110,7 +116,8 @@ typedef union ...@@ -110,7 +116,8 @@ typedef union
uint_reg_t notif : 1; uint_reg_t notif : 1;
uint_reg_t ns : 1; uint_reg_t ns : 1;
uint_reg_t csum : 1; uint_reg_t csum : 1;
uint_reg_t r0 : 7; uint_reg_t r0 : 1;
uint_reg_t efifo_sel : 6;
uint_reg_t gen : 1; uint_reg_t gen : 1;
#endif #endif
...@@ -126,14 +133,16 @@ typedef union ...@@ -126,14 +133,16 @@ typedef union
/** Reserved. */ /** Reserved. */
uint_reg_t __reserved_1 : 3; uint_reg_t __reserved_1 : 3;
/** /**
* Instance ID. For devices that support more than one mPIPE instance, * Instance ID. For devices that support automatic buffer return between
* this field indicates the buffer owner. If the INST field does not * mPIPE instances, this field indicates the buffer owner. If the INST
* match the mPIPE's instance number when a packet is egressed, buffers * field does not match the mPIPE's instance number when a packet is
* with HWB set will be returned to the other mPIPE instance. * egressed, buffers with HWB set will be returned to the other mPIPE
* instance. Note that not all devices support multi-mPIPE buffer
* return. The MPIPE_EDMA_INFO.REMOTE_BUFF_RTN_SUPPORT bit indicates
* whether the INST field in the buffer descriptor is populated by iDMA
* hardware.
*/ */
uint_reg_t inst : 1; uint_reg_t inst : 2;
/** Reserved. */
uint_reg_t __reserved_2 : 1;
/** /**
* Always set to one by hardware in iDMA packet descriptors. For eDMA, * Always set to one by hardware in iDMA packet descriptors. For eDMA,
* indicates whether the buffer will be released to the buffer stack * indicates whether the buffer will be released to the buffer stack
...@@ -166,8 +175,7 @@ typedef union ...@@ -166,8 +175,7 @@ typedef union
uint_reg_t c : 2; uint_reg_t c : 2;
uint_reg_t size : 3; uint_reg_t size : 3;
uint_reg_t hwb : 1; uint_reg_t hwb : 1;
uint_reg_t __reserved_2 : 1; uint_reg_t inst : 2;
uint_reg_t inst : 1;
uint_reg_t __reserved_1 : 3; uint_reg_t __reserved_1 : 3;
uint_reg_t stack_idx : 5; uint_reg_t stack_idx : 5;
uint_reg_t __reserved_0 : 6; uint_reg_t __reserved_0 : 6;
...@@ -408,7 +416,10 @@ typedef union ...@@ -408,7 +416,10 @@ typedef union
/** /**
* Sequence number applied when packet is distributed. Classifier * Sequence number applied when packet is distributed. Classifier
* selects which sequence number is to be applied by writing the 13-bit * selects which sequence number is to be applied by writing the 13-bit
* SQN-selector into this field. * SQN-selector into this field. For devices that support EXT_SQN (as
* indicated in IDMA_INFO.EXT_SQN_SUPPORT), the GP_SQN can be extended to
* 32-bits via the IDMA_CTL.EXT_SQN register. In this case the
* PACKET_SQN will be reduced to 32 bits.
*/ */
uint_reg_t gp_sqn : 16; uint_reg_t gp_sqn : 16;
/** /**
...@@ -451,14 +462,16 @@ typedef union ...@@ -451,14 +462,16 @@ typedef union
/** Reserved. */ /** Reserved. */
uint_reg_t __reserved_5 : 3; uint_reg_t __reserved_5 : 3;
/** /**
* Instance ID. For devices that support more than one mPIPE instance, * Instance ID. For devices that support automatic buffer return between
* this field indicates the buffer owner. If the INST field does not * mPIPE instances, this field indicates the buffer owner. If the INST
* match the mPIPE's instance number when a packet is egressed, buffers * field does not match the mPIPE's instance number when a packet is
* with HWB set will be returned to the other mPIPE instance. * egressed, buffers with HWB set will be returned to the other mPIPE
* instance. Note that not all devices support multi-mPIPE buffer
* return. The MPIPE_EDMA_INFO.REMOTE_BUFF_RTN_SUPPORT bit indicates
* whether the INST field in the buffer descriptor is populated by iDMA
* hardware.
*/ */
uint_reg_t inst : 1; uint_reg_t inst : 2;
/** Reserved. */
uint_reg_t __reserved_6 : 1;
/** /**
* Always set to one by hardware in iDMA packet descriptors. For eDMA, * Always set to one by hardware in iDMA packet descriptors. For eDMA,
* indicates whether the buffer will be released to the buffer stack * indicates whether the buffer will be released to the buffer stack
...@@ -491,8 +504,7 @@ typedef union ...@@ -491,8 +504,7 @@ typedef union
uint_reg_t c : 2; uint_reg_t c : 2;
uint_reg_t size : 3; uint_reg_t size : 3;
uint_reg_t hwb : 1; uint_reg_t hwb : 1;
uint_reg_t __reserved_6 : 1; uint_reg_t inst : 2;
uint_reg_t inst : 1;
uint_reg_t __reserved_5 : 3; uint_reg_t __reserved_5 : 3;
uint_reg_t stack_idx : 5; uint_reg_t stack_idx : 5;
uint_reg_t __reserved_4 : 6; uint_reg_t __reserved_4 : 6;
......
...@@ -16,21 +16,21 @@ ...@@ -16,21 +16,21 @@
#ifndef __ARCH_TRIO_CONSTANTS_H__ #ifndef __ARCH_TRIO_CONSTANTS_H__
#define __ARCH_TRIO_CONSTANTS_H__ #define __ARCH_TRIO_CONSTANTS_H__
#define TRIO_NUM_ASIDS 16 #define TRIO_NUM_ASIDS 32
#define TRIO_NUM_TLBS_PER_ASID 16 #define TRIO_NUM_TLBS_PER_ASID 16
#define TRIO_NUM_TPIO_REGIONS 8 #define TRIO_NUM_TPIO_REGIONS 8
#define TRIO_LOG2_NUM_TPIO_REGIONS 3 #define TRIO_LOG2_NUM_TPIO_REGIONS 3
#define TRIO_NUM_MAP_MEM_REGIONS 16 #define TRIO_NUM_MAP_MEM_REGIONS 32
#define TRIO_LOG2_NUM_MAP_MEM_REGIONS 4 #define TRIO_LOG2_NUM_MAP_MEM_REGIONS 5
#define TRIO_NUM_MAP_SQ_REGIONS 8 #define TRIO_NUM_MAP_SQ_REGIONS 8
#define TRIO_LOG2_NUM_MAP_SQ_REGIONS 3 #define TRIO_LOG2_NUM_MAP_SQ_REGIONS 3
#define TRIO_LOG2_NUM_SQ_FIFO_ENTRIES 6 #define TRIO_LOG2_NUM_SQ_FIFO_ENTRIES 6
#define TRIO_NUM_PUSH_DMA_RINGS 32 #define TRIO_NUM_PUSH_DMA_RINGS 64
#define TRIO_NUM_PULL_DMA_RINGS 32 #define TRIO_NUM_PULL_DMA_RINGS 64
#endif /* __ARCH_TRIO_CONSTANTS_H__ */ #endif /* __ARCH_TRIO_CONSTANTS_H__ */
...@@ -182,10 +182,9 @@ static inline __attribute_const__ int get_order(unsigned long size) ...@@ -182,10 +182,9 @@ static inline __attribute_const__ int get_order(unsigned long size)
#define PAGE_OFFSET (-(_AC(1, UL) << (MAX_VA_WIDTH - 1))) #define PAGE_OFFSET (-(_AC(1, UL) << (MAX_VA_WIDTH - 1)))
#define KERNEL_HIGH_VADDR _AC(0xfffffff800000000, UL) /* high 32GB */ #define KERNEL_HIGH_VADDR _AC(0xfffffff800000000, UL) /* high 32GB */
#define FIXADDR_BASE (KERNEL_HIGH_VADDR - 0x400000000) /* 4 GB */ #define FIXADDR_BASE (KERNEL_HIGH_VADDR - 0x300000000) /* 4 GB */
#define FIXADDR_TOP (KERNEL_HIGH_VADDR - 0x300000000) /* 4 GB */ #define FIXADDR_TOP (KERNEL_HIGH_VADDR - 0x200000000) /* 4 GB */
#define _VMALLOC_START FIXADDR_TOP #define _VMALLOC_START FIXADDR_TOP
#define HUGE_VMAP_BASE (KERNEL_HIGH_VADDR - 0x200000000) /* 4 GB */
#define MEM_SV_START (KERNEL_HIGH_VADDR - 0x100000000) /* 256 MB */ #define MEM_SV_START (KERNEL_HIGH_VADDR - 0x100000000) /* 256 MB */
#define MEM_MODULE_START (MEM_SV_START + (256*1024*1024)) /* 256 MB */ #define MEM_MODULE_START (MEM_SV_START + (256*1024*1024)) /* 256 MB */
#define MEM_MODULE_END (MEM_MODULE_START + (256*1024*1024)) #define MEM_MODULE_END (MEM_MODULE_START + (256*1024*1024))
......
...@@ -55,17 +55,9 @@ ...@@ -55,17 +55,9 @@
#define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE*LAST_PKMAP) & PGDIR_MASK) #define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE*LAST_PKMAP) & PGDIR_MASK)
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
# define __VMAPPING_END (PKMAP_BASE & ~(HPAGE_SIZE-1)) # define _VMALLOC_END (PKMAP_BASE & ~(HPAGE_SIZE-1))
#else #else
# define __VMAPPING_END (FIXADDR_START & ~(HPAGE_SIZE-1)) # define _VMALLOC_END (FIXADDR_START & ~(HPAGE_SIZE-1))
#endif
#ifdef CONFIG_HUGEVMAP
#define HUGE_VMAP_END __VMAPPING_END
#define HUGE_VMAP_BASE (HUGE_VMAP_END - CONFIG_NR_HUGE_VMAPS * HPAGE_SIZE)
#define _VMALLOC_END HUGE_VMAP_BASE
#else
#define _VMALLOC_END __VMAPPING_END
#endif #endif
/* /*
......
...@@ -52,12 +52,10 @@ ...@@ -52,12 +52,10 @@
* memory allocation code). The vmalloc code puts in an internal * memory allocation code). The vmalloc code puts in an internal
* guard page between each allocation. * guard page between each allocation.
*/ */
#define _VMALLOC_END HUGE_VMAP_BASE #define _VMALLOC_END MEM_SV_START
#define VMALLOC_END _VMALLOC_END #define VMALLOC_END _VMALLOC_END
#define VMALLOC_START _VMALLOC_START #define VMALLOC_START _VMALLOC_START
#define HUGE_VMAP_END (HUGE_VMAP_BASE + PGDIR_SIZE)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/* We have no pud since we are a three-level page table. */ /* We have no pud since we are a three-level page table. */
......
...@@ -56,89 +56,89 @@ ...@@ -56,89 +56,89 @@
#define GXIO_MPIPE_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) #define GXIO_MPIPE_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000)
#define GXIO_MPIPE_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) #define GXIO_MPIPE_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001)
int gxio_mpipe_alloc_buffer_stacks(gxio_mpipe_context_t * context, int gxio_mpipe_alloc_buffer_stacks(gxio_mpipe_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags); unsigned int flags);
int gxio_mpipe_init_buffer_stack_aux(gxio_mpipe_context_t * context, int gxio_mpipe_init_buffer_stack_aux(gxio_mpipe_context_t *context,
void *mem_va, size_t mem_size, void *mem_va, size_t mem_size,
unsigned int mem_flags, unsigned int stack, unsigned int mem_flags, unsigned int stack,
unsigned int buffer_size_enum); unsigned int buffer_size_enum);
int gxio_mpipe_alloc_notif_rings(gxio_mpipe_context_t * context, int gxio_mpipe_alloc_notif_rings(gxio_mpipe_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags); unsigned int flags);
int gxio_mpipe_init_notif_ring_aux(gxio_mpipe_context_t * context, void *mem_va, int gxio_mpipe_init_notif_ring_aux(gxio_mpipe_context_t *context, void *mem_va,
size_t mem_size, unsigned int mem_flags, size_t mem_size, unsigned int mem_flags,
unsigned int ring); unsigned int ring);
int gxio_mpipe_request_notif_ring_interrupt(gxio_mpipe_context_t * context, int gxio_mpipe_request_notif_ring_interrupt(gxio_mpipe_context_t *context,
int inter_x, int inter_y, int inter_x, int inter_y,
int inter_ipi, int inter_event, int inter_ipi, int inter_event,
unsigned int ring); unsigned int ring);
int gxio_mpipe_enable_notif_ring_interrupt(gxio_mpipe_context_t * context, int gxio_mpipe_enable_notif_ring_interrupt(gxio_mpipe_context_t *context,
unsigned int ring); unsigned int ring);
int gxio_mpipe_alloc_notif_groups(gxio_mpipe_context_t * context, int gxio_mpipe_alloc_notif_groups(gxio_mpipe_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags); unsigned int flags);
int gxio_mpipe_init_notif_group(gxio_mpipe_context_t * context, int gxio_mpipe_init_notif_group(gxio_mpipe_context_t *context,
unsigned int group, unsigned int group,
gxio_mpipe_notif_group_bits_t bits); gxio_mpipe_notif_group_bits_t bits);
int gxio_mpipe_alloc_buckets(gxio_mpipe_context_t * context, unsigned int count, int gxio_mpipe_alloc_buckets(gxio_mpipe_context_t *context, unsigned int count,
unsigned int first, unsigned int flags); unsigned int first, unsigned int flags);
int gxio_mpipe_init_bucket(gxio_mpipe_context_t * context, unsigned int bucket, int gxio_mpipe_init_bucket(gxio_mpipe_context_t *context, unsigned int bucket,
MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info); MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info);
int gxio_mpipe_alloc_edma_rings(gxio_mpipe_context_t * context, int gxio_mpipe_alloc_edma_rings(gxio_mpipe_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags); unsigned int flags);
int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t * context, void *mem_va, int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t *context, void *mem_va,
size_t mem_size, unsigned int mem_flags, size_t mem_size, unsigned int mem_flags,
unsigned int ring, unsigned int channel); unsigned int ring, unsigned int channel);
int gxio_mpipe_commit_rules(gxio_mpipe_context_t * context, const void *blob, int gxio_mpipe_commit_rules(gxio_mpipe_context_t *context, const void *blob,
size_t blob_size); size_t blob_size);
int gxio_mpipe_register_client_memory(gxio_mpipe_context_t * context, int gxio_mpipe_register_client_memory(gxio_mpipe_context_t *context,
unsigned int iotlb, HV_PTE pte, unsigned int iotlb, HV_PTE pte,
unsigned int flags); unsigned int flags);
int gxio_mpipe_link_open_aux(gxio_mpipe_context_t * context, int gxio_mpipe_link_open_aux(gxio_mpipe_context_t *context,
_gxio_mpipe_link_name_t name, unsigned int flags); _gxio_mpipe_link_name_t name, unsigned int flags);
int gxio_mpipe_link_close_aux(gxio_mpipe_context_t * context, int mac); int gxio_mpipe_link_close_aux(gxio_mpipe_context_t *context, int mac);
int gxio_mpipe_link_set_attr_aux(gxio_mpipe_context_t * context, int mac, int gxio_mpipe_link_set_attr_aux(gxio_mpipe_context_t *context, int mac,
uint32_t attr, int64_t val); uint32_t attr, int64_t val);
int gxio_mpipe_get_timestamp_aux(gxio_mpipe_context_t * context, uint64_t * sec, int gxio_mpipe_get_timestamp_aux(gxio_mpipe_context_t *context, uint64_t *sec,
uint64_t * nsec, uint64_t * cycles); uint64_t *nsec, uint64_t *cycles);
int gxio_mpipe_set_timestamp_aux(gxio_mpipe_context_t * context, uint64_t sec, int gxio_mpipe_set_timestamp_aux(gxio_mpipe_context_t *context, uint64_t sec,
uint64_t nsec, uint64_t cycles); uint64_t nsec, uint64_t cycles);
int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t * context, int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t *context,
int64_t nsec); int64_t nsec);
int gxio_mpipe_adjust_timestamp_freq(gxio_mpipe_context_t * context, int gxio_mpipe_adjust_timestamp_freq(gxio_mpipe_context_t *context,
int32_t ppb); int32_t ppb);
int gxio_mpipe_arm_pollfd(gxio_mpipe_context_t * context, int pollfd_cookie); int gxio_mpipe_arm_pollfd(gxio_mpipe_context_t *context, int pollfd_cookie);
int gxio_mpipe_close_pollfd(gxio_mpipe_context_t * context, int pollfd_cookie); int gxio_mpipe_close_pollfd(gxio_mpipe_context_t *context, int pollfd_cookie);
int gxio_mpipe_get_mmio_base(gxio_mpipe_context_t * context, HV_PTE *base); int gxio_mpipe_get_mmio_base(gxio_mpipe_context_t *context, HV_PTE *base);
int gxio_mpipe_check_mmio_offset(gxio_mpipe_context_t * context, int gxio_mpipe_check_mmio_offset(gxio_mpipe_context_t *context,
unsigned long offset, unsigned long size); unsigned long offset, unsigned long size);
#endif /* !__GXIO_MPIPE_LINUX_RPC_H__ */ #endif /* !__GXIO_MPIPE_LINUX_RPC_H__ */
...@@ -33,18 +33,18 @@ ...@@ -33,18 +33,18 @@
#define GXIO_MPIPE_INFO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) #define GXIO_MPIPE_INFO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001)
int gxio_mpipe_info_instance_aux(gxio_mpipe_info_context_t * context, int gxio_mpipe_info_instance_aux(gxio_mpipe_info_context_t *context,
_gxio_mpipe_link_name_t name); _gxio_mpipe_link_name_t name);
int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t * context, int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t *context,
unsigned int idx, unsigned int idx,
_gxio_mpipe_link_name_t * name, _gxio_mpipe_link_name_t *name,
_gxio_mpipe_link_mac_t * mac); _gxio_mpipe_link_mac_t *mac);
int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t * context, int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t *context,
HV_PTE *base); HV_PTE *base);
int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t * context, int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t *context,
unsigned long offset, unsigned long size); unsigned long offset, unsigned long size);
#endif /* !__GXIO_MPIPE_INFO_LINUX_RPC_H__ */ #endif /* !__GXIO_MPIPE_INFO_LINUX_RPC_H__ */
...@@ -46,59 +46,59 @@ ...@@ -46,59 +46,59 @@
#define GXIO_TRIO_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) #define GXIO_TRIO_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000)
#define GXIO_TRIO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) #define GXIO_TRIO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001)
int gxio_trio_alloc_asids(gxio_trio_context_t * context, unsigned int count, int gxio_trio_alloc_asids(gxio_trio_context_t *context, unsigned int count,
unsigned int first, unsigned int flags); unsigned int first, unsigned int flags);
int gxio_trio_alloc_memory_maps(gxio_trio_context_t * context, int gxio_trio_alloc_memory_maps(gxio_trio_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags); unsigned int flags);
int gxio_trio_alloc_scatter_queues(gxio_trio_context_t * context, int gxio_trio_alloc_scatter_queues(gxio_trio_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags); unsigned int flags);
int gxio_trio_alloc_pio_regions(gxio_trio_context_t * context, int gxio_trio_alloc_pio_regions(gxio_trio_context_t *context,
unsigned int count, unsigned int first, unsigned int count, unsigned int first,
unsigned int flags); unsigned int flags);
int gxio_trio_init_pio_region_aux(gxio_trio_context_t * context, int gxio_trio_init_pio_region_aux(gxio_trio_context_t *context,
unsigned int pio_region, unsigned int mac, unsigned int pio_region, unsigned int mac,
uint32_t bus_address_hi, unsigned int flags); uint32_t bus_address_hi, unsigned int flags);
int gxio_trio_init_memory_map_mmu_aux(gxio_trio_context_t * context, int gxio_trio_init_memory_map_mmu_aux(gxio_trio_context_t *context,
unsigned int map, unsigned long va, unsigned int map, unsigned long va,
uint64_t size, unsigned int asid, uint64_t size, unsigned int asid,
unsigned int mac, uint64_t bus_address, unsigned int mac, uint64_t bus_address,
unsigned int node, unsigned int node,
unsigned int order_mode); unsigned int order_mode);
int gxio_trio_get_port_property(gxio_trio_context_t * context, int gxio_trio_get_port_property(gxio_trio_context_t *context,
struct pcie_trio_ports_property *trio_ports); struct pcie_trio_ports_property *trio_ports);
int gxio_trio_config_legacy_intr(gxio_trio_context_t * context, int inter_x, int gxio_trio_config_legacy_intr(gxio_trio_context_t *context, int inter_x,
int inter_y, int inter_ipi, int inter_event, int inter_y, int inter_ipi, int inter_event,
unsigned int mac, unsigned int intx); unsigned int mac, unsigned int intx);
int gxio_trio_config_msi_intr(gxio_trio_context_t * context, int inter_x, int gxio_trio_config_msi_intr(gxio_trio_context_t *context, int inter_x,
int inter_y, int inter_ipi, int inter_event, int inter_y, int inter_ipi, int inter_event,
unsigned int mac, unsigned int mem_map, unsigned int mac, unsigned int mem_map,
uint64_t mem_map_base, uint64_t mem_map_limit, uint64_t mem_map_base, uint64_t mem_map_limit,
unsigned int asid); unsigned int asid);
int gxio_trio_set_mps_mrs(gxio_trio_context_t * context, uint16_t mps, int gxio_trio_set_mps_mrs(gxio_trio_context_t *context, uint16_t mps,
uint16_t mrs, unsigned int mac); uint16_t mrs, unsigned int mac);
int gxio_trio_force_rc_link_up(gxio_trio_context_t * context, unsigned int mac); int gxio_trio_force_rc_link_up(gxio_trio_context_t *context, unsigned int mac);
int gxio_trio_force_ep_link_up(gxio_trio_context_t * context, unsigned int mac); int gxio_trio_force_ep_link_up(gxio_trio_context_t *context, unsigned int mac);
int gxio_trio_get_mmio_base(gxio_trio_context_t * context, HV_PTE *base); int gxio_trio_get_mmio_base(gxio_trio_context_t *context, HV_PTE *base);
int gxio_trio_check_mmio_offset(gxio_trio_context_t * context, int gxio_trio_check_mmio_offset(gxio_trio_context_t *context,
unsigned long offset, unsigned long size); unsigned long offset, unsigned long size);
#endif /* !__GXIO_TRIO_LINUX_RPC_H__ */ #endif /* !__GXIO_TRIO_LINUX_RPC_H__ */
...@@ -31,16 +31,16 @@ ...@@ -31,16 +31,16 @@
#define GXIO_USB_HOST_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) #define GXIO_USB_HOST_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000)
#define GXIO_USB_HOST_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) #define GXIO_USB_HOST_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001)
int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t * context, int inter_x, int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t *context, int inter_x,
int inter_y, int inter_ipi, int inter_event); int inter_y, int inter_ipi, int inter_event);
int gxio_usb_host_register_client_memory(gxio_usb_host_context_t * context, int gxio_usb_host_register_client_memory(gxio_usb_host_context_t *context,
HV_PTE pte, unsigned int flags); HV_PTE pte, unsigned int flags);
int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t * context, int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t *context,
HV_PTE *base); HV_PTE *base);
int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t * context, int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t *context,
unsigned long offset, unsigned long size); unsigned long offset, unsigned long size);
#endif /* !__GXIO_USB_HOST_LINUX_RPC_H__ */ #endif /* !__GXIO_USB_HOST_LINUX_RPC_H__ */
...@@ -53,7 +53,7 @@ typedef struct { ...@@ -53,7 +53,7 @@ typedef struct {
* @return Zero if the context was successfully initialized, else a * @return Zero if the context was successfully initialized, else a
* GXIO_ERR_xxx error code. * GXIO_ERR_xxx error code.
*/ */
extern int gxio_usb_host_init(gxio_usb_host_context_t * context, int usb_index, extern int gxio_usb_host_init(gxio_usb_host_context_t *context, int usb_index,
int is_ehci); int is_ehci);
/* Destroy a USB context. /* Destroy a USB context.
...@@ -68,20 +68,20 @@ extern int gxio_usb_host_init(gxio_usb_host_context_t * context, int usb_index, ...@@ -68,20 +68,20 @@ extern int gxio_usb_host_init(gxio_usb_host_context_t * context, int usb_index,
* @return Zero if the context was successfully destroyed, else a * @return Zero if the context was successfully destroyed, else a
* GXIO_ERR_xxx error code. * GXIO_ERR_xxx error code.
*/ */
extern int gxio_usb_host_destroy(gxio_usb_host_context_t * context); extern int gxio_usb_host_destroy(gxio_usb_host_context_t *context);
/* Retrieve the address of the shim's MMIO registers. /* Retrieve the address of the shim's MMIO registers.
* *
* @param context Pointer to a properly initialized gxio_usb_host_context_t. * @param context Pointer to a properly initialized gxio_usb_host_context_t.
* @return The address of the shim's MMIO registers. * @return The address of the shim's MMIO registers.
*/ */
extern void *gxio_usb_host_get_reg_start(gxio_usb_host_context_t * context); extern void *gxio_usb_host_get_reg_start(gxio_usb_host_context_t *context);
/* Retrieve the length of the shim's MMIO registers. /* Retrieve the length of the shim's MMIO registers.
* *
* @param context Pointer to a properly initialized gxio_usb_host_context_t. * @param context Pointer to a properly initialized gxio_usb_host_context_t.
* @return The length of the shim's MMIO registers. * @return The length of the shim's MMIO registers.
*/ */
extern size_t gxio_usb_host_get_reg_len(gxio_usb_host_context_t * context); extern size_t gxio_usb_host_get_reg_len(gxio_usb_host_context_t *context);
#endif /* _GXIO_USB_H_ */ #endif /* _GXIO_USB_H_ */
...@@ -84,7 +84,7 @@ COMPAT_SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned int, offset_high, ...@@ -84,7 +84,7 @@ COMPAT_SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned int, offset_high,
{ {
return sys_llseek(fd, offset_high, offset_low, result, origin); return sys_llseek(fd, offset_high, offset_low, result, origin);
} }
/* Provide the compat syscall number to call mapping. */ /* Provide the compat syscall number to call mapping. */
#undef __SYSCALL #undef __SYSCALL
#define __SYSCALL(nr, call) [nr] = (call), #define __SYSCALL(nr, call) [nr] = (call),
......
/*
* Copyright 2011 Tilera Corporation. All Rights Reserved.
*
* 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, version 2.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
* NON INFRINGEMENT. See the GNU General Public License for
* more details.
*
* Atomically access user memory, but use MMU to avoid propagating
* kernel exceptions.
*/
#include <linux/linkage.h>
#include <asm/errno.h>
#include <asm/futex.h>
#include <asm/page.h>
#include <asm/processor.h>
/*
* Provide a set of atomic memory operations supporting <asm/futex.h>.
*
* r0: user address to manipulate
* r1: new value to write, or for cmpxchg, old value to compare against
* r2: (cmpxchg only) new value to write
*
* Return __get_user struct, r0 with value, r1 with error.
*/
#define FUTEX_OP(name, ...) \
STD_ENTRY(futex_##name) \
__VA_ARGS__; \
{ \
move r1, zero; \
jrp lr \
}; \
STD_ENDPROC(futex_##name); \
.pushsection __ex_table,"a"; \
.quad 1b, get_user_fault; \
.popsection
.pushsection .fixup,"ax"
get_user_fault:
{ movei r1, -EFAULT; jrp lr }
ENDPROC(get_user_fault)
.popsection
FUTEX_OP(cmpxchg, mtspr CMPEXCH_VALUE, r1; 1: cmpexch4 r0, r0, r2)
FUTEX_OP(set, 1: exch4 r0, r0, r1)
FUTEX_OP(add, 1: fetchadd4 r0, r0, r1)
FUTEX_OP(or, 1: fetchor4 r0, r0, r1)
FUTEX_OP(andn, nor r1, r1, zero; 1: fetchand4 r0, r0, r1)
...@@ -1268,8 +1268,7 @@ static void __init validate_va(void) ...@@ -1268,8 +1268,7 @@ static void __init validate_va(void)
if ((long)VMALLOC_START >= 0) if ((long)VMALLOC_START >= 0)
early_panic( early_panic(
"Linux VMALLOC region below the 2GB line (%#lx)!\n" "Linux VMALLOC region below the 2GB line (%#lx)!\n"
"Reconfigure the kernel with fewer NR_HUGE_VMAPS\n" "Reconfigure the kernel with smaller VMALLOC_RESERVE.\n",
"or smaller VMALLOC_RESERVE.\n",
VMALLOC_START); VMALLOC_START);
#endif #endif
} }
......
...@@ -551,8 +551,8 @@ static tilegx_bundle_bits jit_x1_bnezt(int ra, int broff) ...@@ -551,8 +551,8 @@ static tilegx_bundle_bits jit_x1_bnezt(int ra, int broff)
/* /*
* This function generates unalign fixup JIT. * This function generates unalign fixup JIT.
* *
* We fist find unalign load/store instruction's destination, source * We first find unalign load/store instruction's destination, source
* reguisters: ra, rb and rd. and 3 scratch registers by calling * registers: ra, rb and rd. and 3 scratch registers by calling
* find_regs(...). 3 scratch clobbers should not alias with any register * find_regs(...). 3 scratch clobbers should not alias with any register
* used in the fault bundle. Then analyze the fault bundle to determine * used in the fault bundle. Then analyze the fault bundle to determine
* if it's a load or store, operand width, branch or address increment etc. * if it's a load or store, operand width, branch or address increment etc.
......
...@@ -149,8 +149,6 @@ static inline int vmalloc_fault(pgd_t *pgd, unsigned long address) ...@@ -149,8 +149,6 @@ static inline int vmalloc_fault(pgd_t *pgd, unsigned long address)
pmd_k = vmalloc_sync_one(pgd, address); pmd_k = vmalloc_sync_one(pgd, address);
if (!pmd_k) if (!pmd_k)
return -1; return -1;
if (pmd_huge(*pmd_k))
return 0; /* support TILE huge_vmap() API */
pte_k = pte_offset_kernel(pmd_k, address); pte_k = pte_offset_kernel(pmd_k, address);
if (!pte_present(*pte_k)) if (!pte_present(*pte_k))
return -1; return -1;
......
...@@ -827,10 +827,6 @@ void __init mem_init(void) ...@@ -827,10 +827,6 @@ void __init mem_init(void)
FIXADDR_START, FIXADDR_TOP + PAGE_SIZE - 1); FIXADDR_START, FIXADDR_TOP + PAGE_SIZE - 1);
printk(KERN_DEBUG " PKMAP %#lx - %#lx\n", printk(KERN_DEBUG " PKMAP %#lx - %#lx\n",
PKMAP_BASE, PKMAP_ADDR(LAST_PKMAP) - 1); PKMAP_BASE, PKMAP_ADDR(LAST_PKMAP) - 1);
#endif
#ifdef CONFIG_HUGEVMAP
printk(KERN_DEBUG " HUGEMAP %#lx - %#lx\n",
HUGE_VMAP_BASE, HUGE_VMAP_END - 1);
#endif #endif
printk(KERN_DEBUG " VMALLOC %#lx - %#lx\n", printk(KERN_DEBUG " VMALLOC %#lx - %#lx\n",
_VMALLOC_START, _VMALLOC_END - 1); _VMALLOC_START, _VMALLOC_END - 1);
......
...@@ -127,8 +127,7 @@ void shatter_huge_page(unsigned long addr) ...@@ -127,8 +127,7 @@ void shatter_huge_page(unsigned long addr)
} }
/* Shatter the huge page into the preallocated L2 page table. */ /* Shatter the huge page into the preallocated L2 page table. */
pmd_populate_kernel(&init_mm, pmd, pmd_populate_kernel(&init_mm, pmd, get_prealloc_pte(pmd_pfn(*pmd)));
get_prealloc_pte(pte_pfn(*(pte_t *)pmd)));
#ifdef __PAGETABLE_PMD_FOLDED #ifdef __PAGETABLE_PMD_FOLDED
/* Walk every pgd on the system and update the pmd there. */ /* Walk every pgd on the system and update the pmd there. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment