/linux/drivers/gpio/ |
H A D | gpio-mlxbf.c | 52 struct mlxbf_gpio_state *gs; in mlxbf_gpio_probe() local 57 gs = devm_kzalloc(&pdev->dev, sizeof(*gs), GFP_KERNEL); in mlxbf_gpio_probe() 58 if (!gs) in mlxbf_gpio_probe() 61 gs->base = devm_platform_ioremap_resource(pdev, 0); in mlxbf_gpio_probe() 62 if (IS_ERR(gs->base)) in mlxbf_gpio_probe() 63 return PTR_ERR(gs->base); in mlxbf_gpio_probe() 65 gc = &gs->gc; in mlxbf_gpio_probe() 67 gs->base + MLXBF_GPIO_PIN_STATE, in mlxbf_gpio_probe() 70 gs->base + MLXBF_GPIO_PIN_DIR_O, in mlxbf_gpio_probe() 71 gs->base + MLXBF_GPIO_PIN_DIR_I, in mlxbf_gpio_probe() [all …]
|
H A D | gpio-mlxbf3.c | 59 struct mlxbf3_gpio_context *gs = gpiochip_get_data(gc); in mlxbf3_gpio_irq_enable() local 66 raw_spin_lock_irqsave(&gs->gc.bgpio_lock, flags); in mlxbf3_gpio_irq_enable() 67 writel(BIT(offset), gs->gpio_cause_io + MLXBF_GPIO_CAUSE_OR_CLRCAUSE); in mlxbf3_gpio_irq_enable() 69 val = readl(gs->gpio_cause_io + MLXBF_GPIO_CAUSE_OR_EVTEN0); in mlxbf3_gpio_irq_enable() 71 writel(val, gs->gpio_cause_io + MLXBF_GPIO_CAUSE_OR_EVTEN0); in mlxbf3_gpio_irq_enable() 72 raw_spin_unlock_irqrestore(&gs->gc.bgpio_lock, flags); in mlxbf3_gpio_irq_enable() 78 struct mlxbf3_gpio_context *gs = gpiochip_get_data(gc); in mlxbf3_gpio_irq_disable() local 83 raw_spin_lock_irqsave(&gs->gc.bgpio_lock, flags); in mlxbf3_gpio_irq_disable() 84 val = readl(gs->gpio_cause_io + MLXBF_GPIO_CAUSE_OR_EVTEN0); in mlxbf3_gpio_irq_disable() 86 writel(val, gs->gpio_cause_io + MLXBF_GPIO_CAUSE_OR_EVTEN0); in mlxbf3_gpio_irq_disable() [all …]
|
H A D | gpio-mlxbf2.c | 130 static int mlxbf2_gpio_lock_acquire(struct mlxbf2_gpio_context *gs) in mlxbf2_gpio_lock_acquire() argument 135 raw_spin_lock(&gs->gc.bgpio_lock); in mlxbf2_gpio_lock_acquire() 143 raw_spin_unlock(&gs->gc.bgpio_lock); in mlxbf2_gpio_lock_acquire() 156 static void mlxbf2_gpio_lock_release(struct mlxbf2_gpio_context *gs) in mlxbf2_gpio_lock_release() argument 157 __releases(&gs->gc.bgpio_lock) in mlxbf2_gpio_lock_release() 161 raw_spin_unlock(&gs->gc.bgpio_lock); in mlxbf2_gpio_lock_release() 186 struct mlxbf2_gpio_context *gs = gpiochip_get_data(chip); in mlxbf2_gpio_direction_input() local 193 ret = mlxbf2_gpio_lock_acquire(gs); in mlxbf2_gpio_direction_input() 197 writel(BIT(offset), gs->gpio_io + YU_GPIO_MODE0_CLEAR); in mlxbf2_gpio_direction_input() 198 writel(BIT(offset), gs->gpio_io + YU_GPIO_MODE1_CLEAR); in mlxbf2_gpio_direction_input() [all …]
|
/linux/drivers/staging/media/atomisp/pci/ |
H A D | atomisp_gmin_platform.c | 142 struct gmin_subdev *gs; in atomisp_register_i2c_module() local 174 gs = find_gmin_subdev(subdev); in atomisp_register_i2c_module() 175 if (!gs) in atomisp_register_i2c_module() 178 pdata_subdevs[i].port = gs->csi_port; in atomisp_register_i2c_module() 179 pdata_subdevs[i].lanes = gs->csi_lanes; in atomisp_register_i2c_module() 510 static int gmin_subdev_add(struct gmin_subdev *gs) in gmin_subdev_add() argument 512 struct i2c_client *client = v4l2_get_subdevdata(gs->subdev); in gmin_subdev_add() 520 gs->clock_src = gmin_get_var_int(dev, false, "ClkSrc", in gmin_subdev_add() 536 gs->csi_port = gmin_get_var_int(dev, false, "CsiPort", default_val); in gmin_subdev_add() 537 gs->csi_lanes = gmin_get_var_int(dev, false, "CsiLanes", 1); in gmin_subdev_add() [all …]
|
/linux/scripts/kconfig/ |
H A D | util.c | 51 struct gstr gs; in str_new() local 52 gs.s = xmalloc(sizeof(char) * 64); in str_new() 53 gs.len = 64; in str_new() 54 gs.max_width = 0; in str_new() 55 strcpy(gs.s, "\0"); in str_new() 56 return gs; in str_new() 60 void str_free(struct gstr *gs) in str_free() argument 62 free(gs->s); in str_free() 63 gs->s = NULL; in str_free() 64 gs->len = 0; in str_free() [all …]
|
/linux/tools/perf/ |
H A D | builtin-inject.c | 1030 static struct guest_vcpu *guest_session__vcpu(struct guest_session *gs, u32 vcpu) in guest_session__vcpu() argument 1032 if (realloc_array_as_needed(gs->vcpu, gs->vcpu_cnt, vcpu, NULL)) in guest_session__vcpu() 1034 return &gs->vcpu[vcpu]; in guest_session__vcpu() 1037 static int guest_session__output_bytes(struct guest_session *gs, void *buf, size_t sz) in guest_session__output_bytes() argument 1039 ssize_t ret = writen(gs->tmp_fd, buf, sz); in guest_session__output_bytes() 1049 struct guest_session *gs = container_of(tool, struct guest_session, tool); in guest_session__repipe() local 1051 return guest_session__output_bytes(gs, event, event->header.size); in guest_session__repipe() 1054 static int guest_session__map_tid(struct guest_session *gs, u32 tid, u32 vcpu) in guest_session__map_tid() argument 1065 hlist_add_head(&guest_tid->node, &gs->tids[hash]); in guest_session__map_tid() 1074 struct guest_session *gs = data; in host_peek_vm_comms_cb() local [all …]
|
/linux/drivers/hte/ |
H A D | hte-tegra194.c | 388 struct tegra_hte_soc *gs; in tegra_hte_line_xlate() local 405 gs = gc->data; in tegra_hte_line_xlate() 406 if (!gs || !gs->prov_data) in tegra_hte_line_xlate() 423 if (gs->prov_data->type == HTE_TEGRA_TYPE_GPIO && !args) { in tegra_hte_line_xlate() 424 line_id = desc->attr.line_id - gpio_device_get_base(gs->gdev); in tegra_hte_line_xlate() 425 map = gs->prov_data->map; in tegra_hte_line_xlate() 426 map_sz = gs->prov_data->map_sz; in tegra_hte_line_xlate() 427 } else if (gs->prov_data->type == HTE_TEGRA_TYPE_GPIO && args) { in tegra_hte_line_xlate() 429 map = gs->prov_data->sec_map; in tegra_hte_line_xlate() 430 map_sz = gs->prov_data->sec_map_sz; in tegra_hte_line_xlate() [all …]
|
/linux/drivers/media/spi/ |
H A D | gs1662.c | 46 struct gs { struct 249 static inline struct gs *to_gs(struct v4l2_subdev *sd) in to_gs() 251 return container_of(sd, struct gs, sd); in to_gs() 257 struct gs *gs = to_gs(sd); in gs_s_dv_timings() local 267 gs->current_timings = *timings; in gs_s_dv_timings() 274 struct gs *gs = to_gs(sd); in gs_g_dv_timings() local 279 *timings = gs->current_timings; in gs_g_dv_timings() 286 struct gs *gs = to_gs(sd); in gs_query_dv_timings() local 294 if (gs->enabled) in gs_query_dv_timings() 302 gs_read_register(gs->pdev, REG_LINES_PER_FRAME + i, ®_value); in gs_query_dv_timings() [all …]
|
/linux/Documentation/arch/x86/x86_64/ |
H A D | fsgs.rst | 3 Using FS and GS segments in user space applications 22 always 0 to provide a full 64bit address space. The FS and GS segments are 25 Common FS and GS usage 37 The GS segment has no common use and can be used freely by 38 applications. GCC and Clang support GS based addressing via address space 41 Reading and writing the FS/GS base address 44 There exist two mechanisms to read and write the FS/GS base address: 50 Accessing FS/GS base with arch_prctl() 69 Accessing FS/GS base with the FSGSBASE instructions 73 instructions to access the FS and GS base registers directly from user [all …]
|
H A D | fred.rst | 32 instruction (LKGS) for managing the state of the GS segment register. 71 LKGS behaves like the MOV to GS instruction except that it loads the 72 base address into the IA32_KERNEL_GS_BASE MSR instead of the GS 74 mucking with kernel GS, i.e., an operating system can always operate 75 with its own GS base address. 78 of the GS base address and that of the IA32_KERNEL_GS_BASE MSR, plus
|
/linux/tools/testing/selftests/x86/ |
H A D | fsgsbase.c | 112 enum which_base { FS, GS }; enumerator 129 asm volatile ("mov %%gs:(%%rcx), %%rax" : : "c" (offset) : "rax"); in read_base() 145 asm volatile ("mov %%gs:(%%rcx), %%rax" in read_base() 163 asm volatile ("mov %%gs, %0" : "=rm" (sel)); in check_gs_value() 164 base = read_base(GS); in check_gs_value() 190 …printf("[RUN]\tARCH_SET_GS to 0x%lx then mov 0 to %%gs%s\n", initial_base, schedule ? " and schedu… in mov_0_gs() 197 asm volatile ("mov %0, %%gs" : : "rm" (0)); in mov_0_gs() 198 base = read_base(GS); in mov_0_gs() 213 * ARCH_SET_FS/GS(0) may or may not program a selector of zero. HARD_ZERO 231 asm volatile ("mov %0, %%gs" : : "rm" ((unsigned short)0)); in do_remote_base() [all …]
|
/linux/lib/ |
H A D | test_hexdump.c | 74 int gs = groupsize, rs = rowsize; in test_hexdump_prepare_test() local 84 if (!is_power_of_2(gs) || gs > 8 || (len % gs != 0)) in test_hexdump_prepare_test() 85 gs = 1; in test_hexdump_prepare_test() 87 if (gs == 8) in test_hexdump_prepare_test() 89 else if (gs == 4) in test_hexdump_prepare_test() 91 else if (gs == 2) in test_hexdump_prepare_test() 98 for (i = 0; i < l / gs; i++) { in test_hexdump_prepare_test() 114 } while (p < test + rs * 2 + rs / gs + 1); in test_hexdump_prepare_test() 166 int rs = rowsize, gs = groupsize; in test_hexdump_overflow() local 174 r = hex_dump_to_buffer(data_b, len, rs, gs, buf, buflen, ascii); in test_hexdump_overflow() [all …]
|
/linux/drivers/net/ |
H A D | geneve.c | 126 static sa_family_t geneve_get_sk_family(struct geneve_sock *gs) in geneve_get_sk_family() argument 128 return gs->sock->sk->sk_family; in geneve_get_sk_family() 131 static struct geneve_dev *geneve_lookup(struct geneve_sock *gs, in geneve_lookup() argument 140 vni_list_head = &gs->vni_list[hash]; in geneve_lookup() 150 static struct geneve_dev *geneve6_lookup(struct geneve_sock *gs, in geneve6_lookup() argument 159 vni_list_head = &gs->vni_list[hash]; in geneve6_lookup() 174 static struct geneve_dev *geneve_lookup_skb(struct geneve_sock *gs, in geneve_lookup_skb() argument 180 if (geneve_get_sk_family(gs) == AF_INET) { in geneve_lookup_skb() 186 if (gs->collect_md) { in geneve_lookup_skb() 194 return geneve_lookup(gs, addr, vni); in geneve_lookup_skb() [all …]
|
/linux/arch/x86/kernel/ |
H A D | process_32.c | 64 unsigned short gs; in __show_regs() local 66 savesegment(gs, gs); in __show_regs() 74 printk("%sDS: %04x ES: %04x FS: %04x GS: %04x SS: %04x EFLAGS: %08lx\n", in __show_regs() 75 log_lvl, (u16)regs->ds, (u16)regs->es, (u16)regs->fs, gs, regs->ss, regs->flags); in __show_regs() 114 loadsegment(gs, 0); in start_thread() 167 * Save away %gs. No need to save %fs, as it was saved on the in __switch_to() 172 * and %gs. This could be an issue if the NMI handler ever in __switch_to() 173 * used %fs or %gs (it does not today), or if the kernel is in __switch_to() 176 savesegment(gs, prev->gs); in __switch_to() 204 * Restore %gs if needed (which is common) in __switch_to() [all …]
|
H A D | process_64.c | 71 unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs; in __show_regs() local 100 printk("%sFS: %016lx GS: %016lx\n", in __show_regs() 108 asm("movl %%gs,%0" : "=r" (gsindex)); in __show_regs() 111 rdmsrl(MSR_GS_BASE, gs); in __show_regs() 119 printk("%sFS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n", in __show_regs() 120 log_lvl, fs, fsindex, gs, gsindex, shadowgs); in __show_regs() 153 GS enumerator 159 * the wrong GS. 173 * operate with its own GS base address: in __rdgsbase_inactive() 175 * the GS base address with the IA32_KERNEL_GS_BASE MSR. in __rdgsbase_inactive() [all …]
|
H A D | head_32.S | 76 movl %eax,%gs 147 movl %eax,%gs 286 movl %eax,%gs # clear possible garbage in %gs 324 /* The vector number is in pt_regs->gs */ 346 /* Load GS into pt_regs->gs (and maybe clobber __gsh) */ 347 movw %gs, PT_GS(%esp) 362 popl %gs /* pt_regs->gs (always ignores __gsh) */
|
/linux/include/linux/usb/ |
H A D | gadget_configfs.h | 11 struct __struct *gs = to_##__struct(item); \ 14 ret = usb_string_copy(page, &gs->__name); \ 23 struct __struct *gs = to_##__struct(item); \ 24 return sprintf(page, "%s\n", gs->__name ?: ""); \ 49 struct struct_in *gs; \ 66 list_for_each_entry(gs, &gi->string_list, list) { \ 67 if (gs->stringtab_dev.language == new->stringtab_dev.language) \
|
/linux/arch/x86/boot/ |
H A D | boot.h | 67 asm volatile("movw %0,%%gs" : : "rm" (seg)); in set_gs() 69 static inline u16 gs(void) in gs() function 72 asm volatile("movw %%gs,%0" : "=rm" (seg)); in gs() 120 asm volatile("movb %%gs:%1,%0" : "=q" (v) : "m" (*ptr)); in rdgs8() 127 asm volatile("movw %%gs:%1,%0" : "=r" (v) : "m" (*ptr)); in rdgs16() 134 asm volatile("movl %%gs:%1,%0" : "=r" (v) : "m" (*ptr)); in rdgs32() 141 asm volatile("movb %1,%%gs:%0" : "+m" (*ptr) : "qi" (v)); in wrgs8() 146 asm volatile("movw %1,%%gs:%0" : "+m" (*ptr) : "ri" (v)); in wrgs16() 151 asm volatile("movl %1,%%gs:%0" : "+m" (*ptr) : "ri" (v)); in wrgs32() 165 asm volatile("gs; repe; cmpsb" CC_SET(nz) in memcmp_gs() [all …]
|
H A D | bioscall.S | 27 pushw %gs 39 popw %gs 54 pushw %gs 75 popw %gs
|
/linux/drivers/s390/scsi/ |
H A D | zfcp_fc.c | 232 void zfcp_fc_wka_ports_force_offline(struct zfcp_fc_wka_ports *gs) in zfcp_fc_wka_ports_force_offline() argument 234 if (!gs) in zfcp_fc_wka_ports_force_offline() 236 zfcp_fc_wka_port_force_offline(&gs->ms); in zfcp_fc_wka_ports_force_offline() 237 zfcp_fc_wka_port_force_offline(&gs->ts); in zfcp_fc_wka_ports_force_offline() 238 zfcp_fc_wka_port_force_offline(&gs->ds); in zfcp_fc_wka_ports_force_offline() 239 zfcp_fc_wka_port_force_offline(&gs->as); in zfcp_fc_wka_ports_force_offline() 406 ret = zfcp_fsf_send_ct(&adapter->gs->ds, &fc_req->ct_els, in zfcp_fc_ns_gid_pn_request() 433 ret = zfcp_fc_wka_port_get(&adapter->gs->ds); in zfcp_fc_ns_gid_pn() 439 zfcp_fc_wka_port_put(&adapter->gs->ds); in zfcp_fc_ns_gid_pn() 708 ret = zfcp_fsf_send_ct(&adapter->gs->ds, ct_els, NULL, in zfcp_fc_send_gpn_ft() [all …]
|
/linux/Documentation/arch/x86/ |
H A D | entry_64.rst | 54 toggles whether gs is the kernel gs or the user gs. The swapgs 90 entry interrupting kernel mode execution, then we know that the GS 97 for GS is the slower method: the RDMSR. 108 that absolutely need the more expensive check for the GS base - and we
|
/linux/drivers/gpu/drm/nouveau/nvkm/engine/device/ |
H A D | pci.c | 74 { 0x106b, 0x00a7, "GeForce 8800 GS" }, 814 { 0x0047, "GeForce 6800 GS" }, 820 { 0x0093, "GeForce 7800 GS" }, 826 { 0x00c0, "GeForce 6800 GS" }, 839 { 0x00f5, "GeForce 7800 GS" }, 840 { 0x00f6, "GeForce 6800 GS" }, 884 { 0x016a, "GeForce 7100 GS" }, 917 { 0x01d3, "GeForce 7300 SE/7200 GS" }, 926 { 0x01df, "GeForce 7300 GS" }, 959 { 0x0292, "GeForce 7900 GS" }, [all …]
|
/linux/arch/x86/include/asm/ |
H A D | stackprotector.h | 12 * x86_64, percpu symbols are zero based and %gs (64-bit) points to the 19 * using %gs. Since 32-bit userspace normally has %fs == 0, we are likely 21 * %gs, we are likely to load a non-null %gs on return to user mode.
|
/linux/drivers/clk/rockchip/ |
H A D | clk.h | 604 df, go, gs, gf) \ argument 620 .gate_shift = gs, \ 625 mf, do, ds, dw, df, go, gs, gf) \ argument 642 .gate_shift = gs, \ 647 go, gs, gf) \ argument 660 .gate_shift = gs, \ 665 df, dt, go, gs, gf) \ argument 679 .gate_shift = gs, \ 684 go, gs, gf) \ argument 697 .gate_shift = gs, \ [all …]
|
/linux/arch/x86/include/uapi/asm/ |
H A D | sigcontext.h | 203 __u16 gs, __gsh; member 258 __u16 gs; member 301 __u16 gs, __gsh; member 348 * Linux saved and restored fs and gs in these slots. This 354 * - Some DOSEMU versions stash fs and gs in these slots manually, 366 * If the kernel ever adds explicit fs, gs, fsbase, and gsbase 370 __u16 gs; member
|