Skip to content

Commit

Permalink
ports/v: Bump revision and fix kernel warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed May 7, 2024
1 parent 8231e56 commit 18bc759
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions kernel/modules/dev/ahci/ahci.v
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,14 @@ fn (mut d AHCIDevice) rw_lba(buffer voidptr, start u64, cnt u64, rw bool) int {
cmd_ptr.device = 1 << 6

cmd_ptr.lba0 = u8(start & 0xff)
cmd_ptr.lba1 = u8(start >> 8 & 0xff)
cmd_ptr.lba2 = u8(start >> 16 & 0xff)
cmd_ptr.lba3 = u8(start >> 24 & 0xff)
cmd_ptr.lba4 = u8(start >> 32 & 0xff)
cmd_ptr.lba5 = u8(start >> 40 & 0xff)
cmd_ptr.lba1 = u8((start >> 8) & 0xff)
cmd_ptr.lba2 = u8((start >> 16) & 0xff)
cmd_ptr.lba3 = u8((start >> 24) & 0xff)
cmd_ptr.lba4 = u8((start >> 32) & 0xff)
cmd_ptr.lba5 = u8((start >> 40) & 0xff)

cmd_ptr.countl = u8(cnt & 0xff)
cmd_ptr.counth = u8(cnt >> 8 & 0xff)
cmd_ptr.counth = u8((cnt >> 8) & 0xff)

d.send_cmd(cmd_slot)

Expand Down Expand Up @@ -466,7 +466,7 @@ pub fn (mut c AHCIController) initialise(pci_device &pci.PCIDevice) int {
c.pci_bar = pci_device.get_bar(0x5)
c.regs = &AHCIRegisters(c.pci_bar.base + higher_half)

c.version_maj = c.regs.vs >> 16 & 0xffff
c.version_maj = (c.regs.vs >> 16) & 0xffff
c.version_min = c.regs.vs & 0xffff

print('ahci: controller detected version ${c.version_maj:x}:${c.version_min:x}\n')
Expand All @@ -482,7 +482,7 @@ pub fn (mut c AHCIController) initialise(pci_device &pci.PCIDevice) int {
c.regs.ghc &= ~(1 << 1)

c.port_cnt = c.regs.cap & 0b11111
c.cmd_slots = c.regs.cap >> 8 & 0b11111
c.cmd_slots = (c.regs.cap >> 8) & 0b11111

for i := u64(0); i < c.port_cnt; i++ {
if c.regs.pi & (1 << i) != 0 {
Expand Down
4 changes: 2 additions & 2 deletions kernel/modules/dev/nvme/nvme.v
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ pub fn (mut namespace NVMENamespace) initialise(mut parent_controller NVMEContro
fn calculate_max_prps(mut c NVMEController, identity &NVMENamespaceID) u64 {
lba_shift := identity.lbaf_list[identity.flbas & 0xf].ds

shift := 12 + (c.regs.cap >> 48 & 0xf)
shift := 12 + ((c.regs.cap >> 48) & 0xf)
mut max_transfer_shift := u64(20)

if c.controller_id.mdts != 0 {
Expand Down Expand Up @@ -739,7 +739,7 @@ pub fn (mut c NVMEController) initialise(pci_device &pci.PCIDevice) int {
}

c.queue_entries = c.regs.cap & 0xffff
c.strides = c.regs.cap >> 32 & 0xf
c.strides = (c.regs.cap >> 32) & 0xf

c.qid_bitmap.initialise(0xffff)

Expand Down
6 changes: 3 additions & 3 deletions recipes/v
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name=v
version=6944f61721b0336ddcac1f5f596640375eb36a29
version=6cc096a4b38172bd8594280cbd09285b65daf7eb
revision=1
tarball_url="https://github.com/vlang/v/archive/${version}.tar.gz"
tarball_blake2b="1c9a708d95e18baf03789f345914c0c9b61819912c564d055e00680180b2a3c5a86ff46ab2ed4378d925313b2e1e105f8e828de7189033e3d5653254231ec249"
tarball_blake2b="6d9900bcc97a456245f631c4aaf92e1e9aa2ce9b9f2dac5c9af3168be9ceb14c6f77c04f6b9f4fff5a8dae5ef814aee0febf033f9c9d1c6860b7134063061ffe"
source_imagedeps="curl"
source_allow_network="yes"
hostdeps="gcc"
deps="core-libs"

regenerate() {
curl -o v.c https://raw.githubusercontent.com/vlang/vc/b1aa385c7c0a56050fc14971e0c6a668cb1cf07a/v.c
curl -o v.c https://raw.githubusercontent.com/vlang/vc/5a6fc9575441287056aa7d6ef64417e1fe6cc3c7/v.c
}

build() {
Expand Down

0 comments on commit 18bc759

Please sign in to comment.